-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate_tables.sql
More file actions
30 lines (27 loc) · 1.17 KB
/
create_tables.sql
File metadata and controls
30 lines (27 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
drop table users;
drop table accounts;
drop table items;
drop table journal;
create table users (identifier primary key,account_id);
create table accounts (
id integer primary key autoincrement,
balance,
description
);
create table items (
id integer primary key autoincrement,
identifier,
value,
description
);
create table journal(account_id,item_id,ammount,timestamp);
insert into items (identifier, value, description) values ('#$1',1,'cash monies');
insert into items (identifier, value, description) values ('#$2',2,'cash monies');
insert into items (identifier, value, description) values ('#$5',5,'cash monies');
insert into items (identifier, value, description) values ('#$10',10,'cash monies');
insert into items (identifier, value, description) values ('#$20',20,'cash monies');
insert into items (identifier, value, description) values ('#$50',50,'cash monies');
insert into items (identifier, value, description) values ('F4029764001807',-3.50,'ClubMate');
insert into accounts (id, balance, description) values(0,0,'Adam');
insert into users (identifier, account_id) values( '#devdsp',0);
insert into users (identifier, account_id) values( 'devdsp',0);