added budget to categories

This commit is contained in:
Derek McQuay 2017-02-04 21:48:43 -08:00
parent a5f0979116
commit 4ff3ed9112
No known key found for this signature in database
GPG Key ID: 92A7BC0C86B0B91A

15
sql.go
View File

@ -11,7 +11,8 @@ users (
CREATE TABLE IF NOT EXISTS
categories (
id SERIAL PRIMARY KEY,
name varchar(1024) UNIQUE
name varchar(1024) UNIQUE,
budget numeric DEFAULT 0
);
CREATE TABLE IF NOT EXISTS
@ -27,11 +28,11 @@ tranx (
`
const primeCategories = `
INSERT INTO categories (name) VALUES
('Derek'),
('Colleen'),
('Groceries'),
('Restaurant'),
('Misc')
INSERT INTO categories (name, budget) VALUES
('Derek', 100),
('Colleen', 100),
('Groceries', 200),
('Restaurant', 200),
('Misc', 100)
;
`