Skip to content

Commit

Permalink
Database changes for collections
Browse files Browse the repository at this point in the history
  • Loading branch information
mah0001 committed May 14, 2024
1 parent 0d3c0fd commit e5b916c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 10 deletions.
11 changes: 11 additions & 0 deletions install/schema.mysql-update.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ALTER TABLE `editor_data_files` MODIFY COLUMN data_checks TEXT DEFAULT NULL;
ALTER TABLE `editor_data_files` MODIFY COLUMN missing_data TEXT DEFAULT NULL;
ALTER TABLE `editor_data_files` MODIFY COLUMN notes TEXT DEFAULT NULL;

ALTER TABLE `editor_data_files` MODIFY COLUMN metadata TEXT DEFAULT NULL;


# Add pid and wgt columns to editor_collections
ALTER TABLE `editor_collections` add pid int DEFAULT NULL;
ALTER TABLE `editor_collections` add wgt int DEFAULT NULL;
ALTER TABLE `editor_collections` ADD UNIQUE index `idx_title_pid` (`title`,`pid`)
27 changes: 17 additions & 10 deletions install/schema.mysql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1632,16 +1632,21 @@ create table editor_project_owners (
primary key (id)
);

create table editor_collections (
id int not null auto_increment,
title varchar(255) not null,
description text,
created int,
changed int,
created_by int,
changed_by int,
primary key (id)
);

CREATE TABLE `editor_collections` (
`id` int NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`description` varchar(1000) DEFAULT NULL,
`created` int DEFAULT NULL,
`created_by` int DEFAULT NULL,
`changed` int DEFAULT NULL,
`changed_by` int DEFAULT NULL,
`pid` int DEFAULT NULL,
`wgt` int DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `title` (`title`,`pid`)
) ENGINE=InnoDB AUTO_INCREMENT=1;


create table editor_collection_projects (
id int not null auto_increment,
Expand Down Expand Up @@ -1790,3 +1795,5 @@ CREATE TABLE `editor_collections_tree` (
PRIMARY KEY (`id`),
UNIQUE KEY `idx_closure` (`parent_id`,`child_id`,`depth`)
) ENGINE=InnoDB AUTO_INCREMENT=1;


0 comments on commit e5b916c

Please sign in to comment.