11 lines
439 B
SQL
11 lines
439 B
SQL
|
|
-- Test plugin migration: creates plugin_test_data table with tenant_id
|
||
|
|
CREATE TABLE IF NOT EXISTS plugin_test_data (
|
||
|
|
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||
|
|
tenant_id UUID NOT NULL,
|
||
|
|
title VARCHAR(200) NOT NULL,
|
||
|
|
content TEXT,
|
||
|
|
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||
|
|
updated_at TIMESTAMPTZ NOT NULL DEFAULT now()
|
||
|
|
);
|
||
|
|
CREATE INDEX IF NOT EXISTS ix_plugin_test_data_tenant ON plugin_test_data(tenant_id);
|