Skip to content

Instantly share code, notes, and snippets.

@AntonioCS
Created November 5, 2020 14:25
Show Gist options
  • Select an option

  • Save AntonioCS/abc87a6cc693e71a13abb846fb43330a to your computer and use it in GitHub Desktop.

Select an option

Save AntonioCS/abc87a6cc693e71a13abb846fb43330a to your computer and use it in GitHub Desktop.

Revisions

  1. AntonioCS created this gist Nov 5, 2020.
    10 changes: 10 additions & 0 deletions create_table
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    CREATE TABLE `<table_name>` (
    `id` INT(11) NOT NULL AUTO_INCREMENT,
    `created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    `updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    `is_deleted` TINYINT(4) NOT NULL DEFAULT '0',
    PRIMARY KEY (`id`) USING BTREE
    )
    COLLATE='utf8mb4_general_ci'
    ENGINE=InnoDB
    ;