Skip to content

Commit

Permalink
misc
Browse files Browse the repository at this point in the history
  • Loading branch information
mah0001 committed Sep 26, 2024
1 parent 4bac114 commit 508765c
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions install/schema.mysql-update.sql
Original file line number Diff line number Diff line change
Expand Up @@ -35,28 +35,38 @@ CREATE TABLE `editor_template_acl` (


ALTER TABLE `editor_templates`
ADD COLUMN `created_by` INT,
ADD COLUMN `changed_by` INT,
ADD COLUMN `owner_id` INT,
ADD COLUMN `is_private` INT NULL,
ADD COLUMN `is_published` INT NULL,
ADD COLUMN `created_by` INT;

ALTER TABLE `editor_templates`
ADD COLUMN `changed_by` INT;

ALTER TABLE `editor_templates`
ADD COLUMN `owner_id` INT;

ALTER TABLE `editor_templates`
ADD COLUMN `is_private` INT NULL;

ALTER TABLE `editor_templates`
ADD COLUMN `is_published` INT NULL;

ALTER TABLE `editor_templates`
ADD COLUMN `is_deleted` INT NULL AFTER `is_published`,
ADD COLUMN `deleted_by` INT NULL AFTER `is_deleted`,
ADD COLUMN `deleted_at` INT NULL AFTER `deleted_by`;


update editor_template set created_by=1 where created_by is null;
update editor_template set owner_id=created_by where owner_id is null;

update editor_templates set created_by=1 where created_by is null;
update editor_templates set owner_id=created_by where owner_id is null;


drop table `edit_history`;
CREATE TABLE `edit_history` (
`id` int NOT NULL AUTO_INCREMENT,
`obj_type` varchar(15) NOT NULL,
`obj_id` int NOT NULL,
`user_id` int DEFAULT NULL,
`action_type` varchar(10) NOT NULL,
`created` datetime NOT NULL,
`created` INT DEFAULT NULL,
`metadata` json DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3;

0 comments on commit 508765c

Please sign in to comment.