第一次提交
This commit is contained in:
17
backend/app/db/sql/003_tenant_quota.sql
Normal file
17
backend/app/db/sql/003_tenant_quota.sql
Normal file
@@ -0,0 +1,17 @@
|
||||
-- 003: tenants 补充 quota / retention_policy 列(接口契约 13.1 需要)
|
||||
DO $$
|
||||
BEGIN
|
||||
IF NOT EXISTS (
|
||||
SELECT 1 FROM information_schema.columns
|
||||
WHERE table_name = 'tenants' AND column_name = 'quota'
|
||||
) THEN
|
||||
ALTER TABLE tenants ADD COLUMN quota TEXT;
|
||||
END IF;
|
||||
IF NOT EXISTS (
|
||||
SELECT 1 FROM information_schema.columns
|
||||
WHERE table_name = 'tenants' AND column_name = 'retention_policy_id'
|
||||
) THEN
|
||||
ALTER TABLE tenants ADD COLUMN retention_policy_id TEXT;
|
||||
END IF;
|
||||
END
|
||||
$$;
|
||||
Reference in New Issue
Block a user