Schema Change
This commit is contained in:
@@ -6,6 +6,7 @@ CREATE TABLE expenses (
|
|||||||
StoreID int NOT NULL DEFAULT 0,
|
StoreID int NOT NULL DEFAULT 0,
|
||||||
CategoryID int NOT NULL DEFAULT 0,
|
CategoryID int NOT NULL DEFAULT 0,
|
||||||
OwnerUserID int NOT NULL DEFAULT 0,
|
OwnerUserID int NOT NULL DEFAULT 0,
|
||||||
|
ExpTypeID int NOT NULL DEFAULT 0,
|
||||||
ExpDate int NOT NULL DEFAULT -1,
|
ExpDate int NOT NULL DEFAULT -1,
|
||||||
CreationDate int NOT NULL DEFAULT -1,
|
CreationDate int NOT NULL DEFAULT -1,
|
||||||
FOREIGN KEY(StoreID) REFERENCES stores(StoreID),
|
FOREIGN KEY(StoreID) REFERENCES stores(StoreID),
|
||||||
@@ -29,6 +30,14 @@ CREATE TABLE categories(
|
|||||||
-- Create a default category for NoCategory
|
-- Create a default category for NoCategory
|
||||||
INSERT INTO categories (CategoryID, CategoryName) VALUES(0, 'No Category');
|
INSERT INTO categories (CategoryID, CategoryName) VALUES(0, 'No Category');
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS expenseTypes;
|
||||||
|
CREATE TABLE expenseTypes(
|
||||||
|
ExpTypeID integer PRIMARY KEY AUTOINCREMENT,
|
||||||
|
ExpTypeName text NOT NULL
|
||||||
|
);
|
||||||
|
-- Create a default category for NoCategory
|
||||||
|
INSERT INTO expenseTypes (ExpTypeID, ExpTypeName) VALUES(0, 'expense');
|
||||||
|
|
||||||
DROP TABLE IF EXISTS users;
|
DROP TABLE IF EXISTS users;
|
||||||
CREATE TABLE users(
|
CREATE TABLE users(
|
||||||
UserID integer PRIMARY KEY AUTOINCREMENT,
|
UserID integer PRIMARY KEY AUTOINCREMENT,
|
||||||
|
|||||||
Reference in New Issue
Block a user