update my tickets table creation
This commit is contained in:
@@ -34,6 +34,7 @@ func InitDB(filepath string) *sql.DB {
|
||||
createMyTicketsTable := `
|
||||
CREATE TABLE IF NOT EXISTS my_tickets (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
userId INTEGER NOT NULL,
|
||||
game_type TEXT NOT NULL,
|
||||
draw_date TEXT NOT NULL,
|
||||
ball1 INTEGER,
|
||||
@@ -44,7 +45,10 @@ func InitDB(filepath string) *sql.DB {
|
||||
bonus1 INTEGER,
|
||||
bonus2 INTEGER,
|
||||
duplicate BOOLEAN DEFAULT 0,
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
|
||||
purchased_date TEXT,
|
||||
purchased_location TEXT,
|
||||
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
|
||||
FOREIGN KEY (userId) REFERENCES users(id)
|
||||
);`
|
||||
|
||||
if _, err := db.Exec(createMyTicketsTable); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user