6 lines
265 B
PL/PgSQL
6 lines
265 B
PL/PgSQL
BEGIN;
|
|
-- API-authored notes may retain a legacy 24-character public ID without code registration.
|
|
ALTER TABLE posts ADD COLUMN public_id text UNIQUE CHECK(public_id ~ '^[0-9a-f]{24}$');
|
|
INSERT INTO schema_migrations(version) VALUES('006_post_public_ids');
|
|
COMMIT;
|