diff --git a/migrations/.keep b/migrations/.keep new file mode 100644 index 0000000..e69de29 diff --git a/migrations/2025-06-20-111801_create_tasks/down.sql b/migrations/2025-06-20-111801_create_tasks/down.sql new file mode 100644 index 0000000..39667d2 --- /dev/null +++ b/migrations/2025-06-20-111801_create_tasks/down.sql @@ -0,0 +1,2 @@ +-- This file should undo anything in `up.sql` +DROP TABLE IF EXISTS `tasks`; diff --git a/migrations/2025-06-20-111801_create_tasks/up.sql b/migrations/2025-06-20-111801_create_tasks/up.sql new file mode 100644 index 0000000..09e14e7 --- /dev/null +++ b/migrations/2025-06-20-111801_create_tasks/up.sql @@ -0,0 +1,7 @@ +-- Your SQL goes here +CREATE TABLE `tasks`( + `id` INT4 NOT NULL PRIMARY KEY, + `title` VARCHAR NOT NULL, + `description` TEXT NOT NULL +); + diff --git a/src/schema.rs b/src/schema.rs new file mode 100644 index 0000000..4cc919d --- /dev/null +++ b/src/schema.rs @@ -0,0 +1,9 @@ +// @generated automatically by Diesel CLI. + +diesel::table! { + tasks (id) { + id -> Integer, + title -> Text, + description -> Text, + } +}