visuddhinanda 4 лет назад
Родитель
Сommit
db4c8d7154

+ 0 - 2
db/migrations/2021-07-06-125510_create-users/down.sql

@@ -1,2 +0,0 @@
--- This file should undo anything in `up.sql`
-DROP TABLE users

+ 0 - 7
db/migrations/2021-07-06-125510_create-users/up.sql

@@ -1,7 +0,0 @@
--- Your SQL goes here
-CREATE TABLE users
-(
-id int,
-name varchar(255),
-emails varchar(255)
-)

+ 0 - 3
db/migrations/2021-07-09-125349_new_course/down.sql

@@ -1,3 +0,0 @@
--- This file should undo anything in `up.sql`
-DROP TABLE courses ;
-DROP TABLE lessons ;

+ 0 - 42
db/migrations/2021-07-09-125349_new_course/up.sql

@@ -1,42 +0,0 @@
--- Your SQL goes here
-
-CREATE TABLE courses
-( 
-    id SERIAL PRIMARY KEY, 
-    cover VARCHAR(255), 
-    title VARCHAR(32) NOT NULL, 
-    subtitle VARCHAR(32),
-    summary VARCHAR(255),
-    teacher INTEGER NOT NULL, 
-    lang VARCHAR (8), 
-    speech_lang VARCHAR (8), 
-    status INTEGER NOT NULL DEFAULT(0), 
-    lesson_num INTEGER NOT NULL DEFAULT(0), 
-    content TEXT ,  
-    creator INTEGER NOT NULL, 
-    version INTEGER,
-    created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
-    updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
-);
-
-CREATE TABLE lessons
-(
-    id SERIAL PRIMARY KEY, 
-    course_id INTEGER NOT NULL,
-    course_uuid VARCHAR(36),
-    title VARCHAR(32) NOT NULL, 
-    subtitle VARCHAR(32), 
-    summary VARCHAR(255), 
-    status INTEGER  NOT NULL DEFAULT(0), 
-    cover VARCHAR(255), 
-    teacher INTEGER, 
-    lang VARCHAR(8), 
-    speech_lang VARCHAR(8), 
-    start_date TIMESTAMP, 
-    duration INTEGER, 
-    content TEXT,
-    creator INTEGER  NOT NULL,    
-    version INTEGER,
-    created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
-    updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
-);

+ 0 - 3
db/migrations/2021-07-15-131154_create_article/down.sql

@@ -1,3 +0,0 @@
--- This file should undo anything in `up.sql`
-
-DROP TABLE articles

+ 0 - 18
db/migrations/2021-07-15-131154_create_article/up.sql

@@ -1,18 +0,0 @@
--- Your SQL goes here
-
-CREATE TABLE articles (
-    id SERIAL PRIMARY KEY,
-    uuid         VARCHAR (36) ,
-    title        VARCHAR (32) NOT NULL,
-    subtitle     VARCHAR (32),
-    summary      VARCHAR (255),
-    content      TEXT,
-    owner_id     INTEGER  NOT NULL,
-    owner        VARCHAR (36),
-    setting      JSON,
-    status       INTEGER   NOT NULL DEFAULT (10),
-	version     INTEGER NOT NULL DEFAULT (1),
-    deleted_at  TIMESTAMP,
-    created_at  TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
-    updated_at  TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
-);

+ 0 - 3
db/migrations/2021-07-16-010532_create_collection/down.sql

@@ -1,3 +0,0 @@
--- This file should undo anything in `up.sql`
-
-DROP TABLE collections

+ 0 - 18
db/migrations/2021-07-16-010532_create_collection/up.sql

@@ -1,18 +0,0 @@
--- Your SQL goes here
-
-CREATE TABLE collections (
-    id SERIAL PRIMARY KEY,
-    uuid         VARCHAR (36) ,
-    title        VARCHAR (32) NOT NULL,
-    subtitle     VARCHAR (32),
-    summary      VARCHAR (255),
-    article_list TEXT,
-    status       INTEGER   NOT NULL DEFAULT (10),
-    creator_id   INTEGER,
-    owner        VARCHAR (36),
-    lang         CHAR (8),
-	version     INTEGER NOT NULL DEFAULT (1),
-    deleted_at  TIMESTAMP,
-    created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
-    updated_at  TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
-);

+ 0 - 3
db/migrations/2021-07-16-130715_collection_article_list/down.sql

@@ -1,3 +0,0 @@
--- This file should undo anything in `up.sql`
-
-DROP TABLE collection_article_lists

+ 0 - 8
db/migrations/2021-07-16-130715_collection_article_list/up.sql

@@ -1,8 +0,0 @@
--- article 关联表
-CREATE TABLE article_lists (
-    id SERIAL PRIMARY KEY,
-    collection_id    INTEGER NOT NULL ,
-    article_id    INTEGER  NOT NULL ,
-    created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
-);
-