added sql to go with db
This commit is contained in:
parent
5985527302
commit
4d5077d72d
35
sql.go
Normal file
35
sql.go
Normal file
@ -0,0 +1,35 @@
|
||||
package chipmunk
|
||||
|
||||
const createdb = `
|
||||
CREATE TABLE IF NOT EXISTS
|
||||
users (
|
||||
id uuid PRIMARY KEY,
|
||||
email varchar(64) UNIQUE,
|
||||
admin boolean DEFAULT false
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS
|
||||
categories (
|
||||
id SERIAL PRIMARY KEY,
|
||||
name varchar(1024) UNIQUE
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS
|
||||
tranx (
|
||||
id SERIAL PRIMARY KEY,
|
||||
cost numeric DEFAULT 0,
|
||||
store varchar(64) UNIQUE,
|
||||
info varchar(1024) UNIQUE,
|
||||
user uuid
|
||||
);
|
||||
`
|
||||
|
||||
const primeCategories = `
|
||||
INSERT INTO categories (name) VALUES
|
||||
('Derek'),
|
||||
('Colleen'),
|
||||
('Groceries'),
|
||||
('Restaurant'),
|
||||
('Misc')
|
||||
;
|
||||
`
|
Loading…
Reference in New Issue
Block a user