chore: 初始化仓库,导入项目基线代码
Academy v0.8.3 完整代码基线:Go 后端(internal/cmd/cli/mcp-server/docreader)、 Vue 前端(frontend)、数据库迁移(migrations)、部署编排(docker/helm/deploy)与文档。 今日开发的培训推送管理改动随后单独提交。
This commit is contained in:
commit
7ec21f35b0
5767 files changed
+1436788
No files matched your search
@@ -0,0 +1,26 @@
|
||||
-- Migration 000044 down: drop audit_logs table.
|
||||
--
|
||||
-- DANGER: This drops the audit_logs table. All durable RBAC and
|
||||
-- resource-action history is lost UNRECOVERABLY. Only intended
|
||||
-- for development rollbacks, never for production.
|
||||
--
|
||||
-- Operators who really need to run this in a non-dev environment must
|
||||
-- set the session-level GUC `academy.allow_destructive_migration` to
|
||||
-- 'true' first. Otherwise the migration aborts before touching any data.
|
||||
DO $$
|
||||
BEGIN
|
||||
IF coalesce(current_setting('academy.allow_destructive_migration', true), 'false') <> 'true' THEN
|
||||
RAISE EXCEPTION
|
||||
'[Migration 000044 down] BLOCKED: refuse to drop audit_logs. '
|
||||
'Set academy.allow_destructive_migration = ''true'' in this session to override.';
|
||||
END IF;
|
||||
RAISE WARNING '[Migration 000044 down] Dropping audit_logs — durable history will be lost';
|
||||
END $$;
|
||||
|
||||
DROP INDEX IF EXISTS idx_audit_logs_created_at;
|
||||
DROP INDEX IF EXISTS idx_audit_logs_tenant_action;
|
||||
DROP INDEX IF EXISTS idx_audit_logs_actor;
|
||||
DROP INDEX IF EXISTS idx_audit_logs_tenant_id_desc;
|
||||
DROP TABLE IF EXISTS audit_logs;
|
||||
|
||||
DO $$ BEGIN RAISE NOTICE '[Migration 000044 down] audit_logs dropped'; END $$;
|
||||
Reference in new issue
Block a user