You've already forked gun-manager-backend
migrations
This commit is contained in:
2
migrations/000001_initial_db.down.sql
Normal file
2
migrations/000001_initial_db.down.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
drop table photos;
|
||||
drop table guns;
|
||||
23
migrations/000001_initial_db.up.sql
Normal file
23
migrations/000001_initial_db.up.sql
Normal file
@@ -0,0 +1,23 @@
|
||||
create table if not exists guns
|
||||
(
|
||||
id integer
|
||||
constraint id
|
||||
primary key autoincrement,
|
||||
make text,
|
||||
model text,
|
||||
serial_number text,
|
||||
purchase_amount integer,
|
||||
value_amount integer,
|
||||
date_purchased text,
|
||||
notes text
|
||||
);
|
||||
|
||||
create table if not exists photos
|
||||
(
|
||||
id integer
|
||||
constraint id
|
||||
primary key autoincrement,
|
||||
gun_id integer,
|
||||
photo blob,
|
||||
filename text
|
||||
);
|
||||
Reference in New Issue
Block a user