Files

10 lines
430 B
SQL
Raw Permalink Normal View History

-- Sample plugin migration: creates plugin_sample_data table with tenant_id
CREATE TABLE IF NOT EXISTS plugin_sample_data (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
tenant_id UUID NOT NULL,
name VARCHAR(255) NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
CREATE INDEX IF NOT EXISTS ix_plugin_sample_data_tenant ON plugin_sample_data(tenant_id);