Last active
August 20, 2019 04:50
-
-
Save spartan/0c488ac30d02ed822893a6e23bec879d to your computer and use it in GitHub Desktop.
MySQL Table suffix columns
This file contains hidden or 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
alter table {name} | |
add column `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
add column `created_by` int(10) unsigned NOT NULL, | |
add column `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, | |
add column `updated_by` int(10) unsigned DEFAULT NULL, | |
/* add column `deleted_at` timestamp DEFAULT NULL, */ | |
/* add column `deleted_by` int(10) unsigned DEFAULT NULL, */ | |
add column `status` tinyint(3) unsigned NOT NULL; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment