Refactor db code. Add migration support
This commit is contained in:
5
internal/repository/migrations/0000_schema.down.sql
Normal file
5
internal/repository/migrations/0000_schema.down.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
CREATE TABLE authors (
|
||||
id INTEGER PRIMARY KEY,
|
||||
name TEXT NOT NULL,
|
||||
bio TEXT
|
||||
);
|
11
internal/repository/migrations/0000_schema.up.sql
Normal file
11
internal/repository/migrations/0000_schema.up.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
CREATE TABLE news (
|
||||
id INTEGER PRIMARY KEY,
|
||||
name TEXT NOT NULL,
|
||||
bio TEXT
|
||||
);
|
||||
|
||||
CREATE TABLE retailer (
|
||||
id INTEGER PRIMARY KEY,
|
||||
name TEXT NOT NULL,
|
||||
bio TEXT
|
||||
);
|
Reference in New Issue
Block a user