Initial sqlite schema.
This commit is contained in:
parent
c2b7c12905
commit
3a7d28030d
7 changed files with 1305 additions and 14 deletions
2
backend/.gitignore
vendored
2
backend/.gitignore
vendored
|
|
@ -1 +1,3 @@
|
|||
/target
|
||||
|
||||
*.db
|
||||
|
|
|
|||
1287
backend/Cargo.lock
generated
1287
backend/Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -5,6 +5,7 @@ edition = "2024"
|
|||
|
||||
[dependencies]
|
||||
axum = "0.8.4"
|
||||
sqlx = "0.8.6"
|
||||
tokio = { version = "1.47.1", features = ["rt-multi-thread", "tracing"] }
|
||||
tracing = "0.1.41"
|
||||
tracing-subscriber = "0.3.19"
|
||||
|
|
|
|||
2
backend/migrations/20250823023643_create_tasks.down.sql
Normal file
2
backend/migrations/20250823023643_create_tasks.down.sql
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
-- Add down migration script here
|
||||
DROP TABLE tasks
|
||||
10
backend/migrations/20250823023643_create_tasks.up.sql
Normal file
10
backend/migrations/20250823023643_create_tasks.up.sql
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
-- Add up migration script here
|
||||
CREATE TABLE tasks (
|
||||
id UUID PRIMARY KEY NOT NULL,
|
||||
title VARCHAR NOT NULL,
|
||||
description TEXT,
|
||||
status TEXT CHECK(status IN ('todo', 'done', 'backlog')) DEFAULT 'todo',
|
||||
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
completed_at TIMESTAMP
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue