-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1002 from rfcx/feature/add-columns-to-projects
Created at and updated at columns migrations to projects are added
- Loading branch information
Showing
4 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ALTER TABLE `arbimon2`.`projects` | ||
ADD COLUMN `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, | ||
ADD COLUMN `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; | ||
|
||
CREATE TRIGGER projects_update BEFORE UPDATE ON `arbimon2`.`projects` FOR EACH ROW SET NEW.updated_at = NOW(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ALTER TABLE `arbimon2`.`species` | ||
ADD COLUMN `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, | ||
ADD COLUMN `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; | ||
|
||
CREATE TRIGGER species_update BEFORE UPDATE ON `arbimon2`.`species` FOR EACH ROW SET NEW.updated_at = NOW(); |
5 changes: 5 additions & 0 deletions
5
scripts/db/030-add-created-at-updated-at-to-recording-validations.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ALTER TABLE `arbimon2`.`recording_validations` | ||
ADD COLUMN `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, | ||
ADD COLUMN `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; | ||
|
||
CREATE TRIGGER recording_validations_update BEFORE UPDATE ON `arbimon2`.`recording_validations` FOR EACH ROW SET NEW.updated_at = NOW(); |