Skip to content

Commit

Permalink
Use INTEGER NOT NULL to follow crecto example
Browse files Browse the repository at this point in the history
From the crecto spec, they use INTEGER NOT NULL for the id, and this change fixes watzon#1.
  • Loading branch information
etra0 authored Sep 18, 2024
1 parent 7ab33da commit a1599f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db/migrations/20231222134745_create_pastes.sql
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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;
DROP TABLE IF EXISTS pastes;

0 comments on commit a1599f2

Please sign in to comment.