update migrations 3
This commit is contained in:
parent
2790d7cba4
commit
e9d86caf3e
@ -1,3 +1,5 @@
|
||||
ALTER TABLE `committees` ADD COLUMN `created_by` INT DEFAULT NULL;
|
||||
ALTER TABLE `committees` ADD CONSTRAINT `fk_committees_created_by` FOREIGN KEY (`created_by`) REFERENCES `users`(`id`) ON DELETE SET NULL;
|
||||
CREATE TRIGGER `before_insert_accounting_accounts` BEFORE INSERT ON `accounting_accounts` FOR EACH ROW BEGIN IF @app_user_id IS NOT NULL THEN SET NEW.created_by = @app_user_id; SET NEW.updated_by = @app_user_id; END IF; END;
|
||||
CREATE TRIGGER `before_update_accounting_accounts` BEFORE UPDATE ON `accounting_accounts` FOR EACH ROW BEGIN IF @app_user_id IS NOT NULL THEN SET NEW.updated_by = @app_user_id; END IF; END;
|
||||
CREATE TRIGGER `before_insert_accounting_journal` BEFORE INSERT ON `accounting_journal` FOR EACH ROW BEGIN IF @app_user_id IS NOT NULL THEN SET NEW.created_by = @app_user_id; SET NEW.updated_by = @app_user_id; END IF; END;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user