paste69/db/migrations/20231231124404_create_urls.sql

13 lines
431 B
MySQL
Raw Normal View History

2024-01-03 00:54:12 +00:00
-- +micrate Up
-- SQL in section 'Up' is executed when this migration is applied
CREATE TABLE IF NOT EXISTS urls (
id BIGSERIAL PRIMARY KEY,
url TEXT NOT NULL,
hits BIGINT NOT NULL DEFAULT 0,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);
-- +micrate Down
-- SQL section 'Down' is executed when this migration is rolled back
DROP TABLE urls;