first commit
This commit is contained in:
5
db/sqlc/migrations/001_create_identifiers.down.sql
Normal file
5
db/sqlc/migrations/001_create_identifiers.down.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
DROP INDEX IF EXISTS idx_identifiers_created_at;
|
||||
DROP INDEX IF EXISTS idx_identifiers_slug;
|
||||
|
||||
DROP TABLE IF EXISTS identifiers;
|
||||
|
||||
12
db/sqlc/migrations/001_create_identifiers.up.sql
Normal file
12
db/sqlc/migrations/001_create_identifiers.up.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
CREATE TABLE identifiers (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
slug VARCHAR(255) UNIQUE NOT NULL,
|
||||
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
|
||||
updated_at TIMESTAMP NOT NULL DEFAULT NOW()
|
||||
);
|
||||
|
||||
CREATE INDEX idx_identifiers_created_at
|
||||
ON identifiers(created_at);
|
||||
|
||||
CREATE INDEX idx_identifiers_slug
|
||||
ON identifiers(slug);
|
||||
Reference in New Issue
Block a user