HabitTracker/db/migrations/1709118311_create_habits_table.sql
Yapollon e2f1402d50 Habit Streak Update (2/2)
Yeah reworked the entire thing so that the checked, count and streak value is stored in the Habit Table
2024-02-28 14:14:10 +01:00

16 lines
486 B
SQL

CREATE TABLE IF NOT EXISTS habits
(
id INTEGER PRIMARY KEY AUTOINCREMENT,
list_id INTEGER NOT NULL,
name TEXT NOT NULL,
note TEXT,
times INTEGER NOT NULL,
unit INTEGER,
slot INTEGER NOT NULL,
checked BOOLEAN NOT NULL,
count INTEGER NOT NULL,
streak INTEGER NOT NULL,
created_at TEXT NOT NULL,
updated_at TEXT NOT NULL,
FOREIGN KEY (list_id) REFERENCES habit_lists(id)
);