Files
rostpoliplast/backend/migrations/001_create_bales.sql
T
2026-04-29 14:27:16 +03:00

17 lines
405 B
SQL

-- +goose Up
-- +goose StatementBegin
CREATE TABLE IF NOT EXISTS bales (
id SERIAL PRIMARY KEY,
type_id INTEGER,
timestamp TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- +goose StatementEnd
-- +goose StatementBegin
CREATE INDEX IF NOT EXISTS idx_bales_timestamp ON bales(timestamp);
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP TABLE IF EXISTS bales;
-- +goose StatementEnd