-
Notifications
You must be signed in to change notification settings - Fork 923
/
Copy pathgendb.sh
executable file
·13 lines (7 loc) · 1.57 KB
/
gendb.sh
1
2
3
4
5
6
7
8
9
10
11
12
rm -rf dbs
mkdir dbs
sqlite3 dbs/customer1.db "DROP TABLE IF EXISTS balance;" "DROP TABLE IF EXISTS transactions;" "CREATE TABLE transactions (type TEXT,date TEXT,value INTEGER,description TEXT);" "CREATE TABLE balance (value INTEGER, min INTEGER CHECK(value >= -100000));" "INSERT INTO balance (value, min) values (0,100000);" ".exit"
sqlite3 dbs/customer2.db "DROP TABLE IF EXISTS balance;" "DROP TABLE IF EXISTS transactions;" "CREATE TABLE transactions (type TEXT,date TEXT,value INTEGER,description TEXT);" "CREATE TABLE balance (value INTEGER, min INTEGER CHECK(value >= -80000));" "INSERT INTO balance (value, min) values (0,80000);" ".exit"
sqlite3 dbs/customer3.db "DROP TABLE IF EXISTS balance;" "DROP TABLE IF EXISTS transactions;" "CREATE TABLE transactions (type TEXT,date TEXT,value INTEGER,description TEXT);" "CREATE TABLE balance (value INTEGER, min INTEGER CHECK(value >= -1000000));" "INSERT INTO balance (value, min) values (0,1000000);" ".exit"
sqlite3 dbs/customer4.db "DROP TABLE IF EXISTS balance;" "DROP TABLE IF EXISTS transactions;" "CREATE TABLE transactions (type TEXT,date TEXT,value INTEGER,description TEXT);" "CREATE TABLE balance (value INTEGER, min INTEGER CHECK(value >= -10000000));" "INSERT INTO balance (value, min) values (0,10000000);" ".exit"
sqlite3 dbs/customer5.db "DROP TABLE IF EXISTS balance;" "DROP TABLE IF EXISTS transactions;" "CREATE TABLE transactions (type TEXT,date TEXT,value INTEGER,description TEXT);" "CREATE TABLE balance (value INTEGER, min INTEGER CHECK(value >= -500000));" "INSERT INTO balance (value, min) values (0,500000);" ".exit"