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