LoginSignup
0
0

More than 5 years have passed since last update.

MySQLクエリメモ

Last updated at Posted at 2017-02-20
CREATE DATABASE fullstack CHARACTER SET utf8;

●コンテンツ管理テーブル

CREATE TABLE dtb_contents(
 content_id int NOT NULL AUTO_INCREMENT PRIMARY KEY
,content_title TEXT
,content_subtitle TEXT
,content_body LONGTEXT
,create_date DATETIME
,update_date DATETIME
,delete_flag TINYINT default 0
);

●プロフィール管理テーブル

create table dtb_profile
(
 profile_id int NOT NULL AUTO_INCREMENT PRIMARY KEY
,profile_name varchar(256)
,profile_body text
,profile_image_file_name varchar(256)
,create_date datetime DEFAULT NULL
,update_date datetime DEFAULT NULL
,delete_flag tinyint(4) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8

●画像ファイル管理テーブル

CREATE TABLE dtb_images(
 image_id int NOT NULL AUTO_INCREMENT PRIMARY KEY
,image_file_name TEXT
,image_alt TEXT
,create_date DATETIME
,update_date DATETIME
,delete_flag TINYINT default 0
);
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0