From a1599f2847536f9d2968f1b8e3635efe787de8ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20A=2E?= Date: Wed, 18 Sep 2024 19:32:47 -0300 Subject: [PATCH] Use INTEGER NOT NULL to follow crecto example From the crecto spec, they use INTEGER NOT NULL for the id, and this change fixes #1. --- db/migrations/20231222134745_create_pastes.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/migrations/20231222134745_create_pastes.sql b/db/migrations/20231222134745_create_pastes.sql index 2805750..64cb9ee 100644 --- a/db/migrations/20231222134745_create_pastes.sql +++ b/db/migrations/20231222134745_create_pastes.sql @@ -1,7 +1,7 @@ -- +micrate Up -- SQL in section 'Up' is executed when this migration is applied CREATE TABLE IF NOT EXISTS pastes ( - id BIGSERIAL PRIMARY KEY, + id INTEGER NOT NULL PRIMARY KEY, sha256 TEXT UNIQUE NOT NULL, ext TEXT NOT NULL, mime TEXT NOT NULL, @@ -21,4 +21,4 @@ CREATE TABLE IF NOT EXISTS pastes ( -- +micrate Down -- SQL section 'Down' is executed when this migration is rolled back -DROP TABLE IF EXISTS pastes; \ No newline at end of file +DROP TABLE IF EXISTS pastes;