Files
madbase/migrations/20260312000002_functions_schema.sql

13 lines
385 B
SQL

CREATE SCHEMA IF NOT EXISTS functions;
CREATE TABLE functions.functions (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
name TEXT NOT NULL UNIQUE,
code BYTEA NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
-- Index for faster lookup by name
CREATE INDEX idx_functions_name ON functions.functions(name);