feat(topology): create 8 core tables with constraints and indexes

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-07-09 20:48:28 +08:00
co-authored by Claude
parent 481992bacc
commit d31e09fdea
3 changed files with 193 additions and 0 deletions
@@ -1,8 +1,14 @@
-- topology_api/migrations/001_extensions.sql
-- Create schema and required PostgreSQL extensions
-- Extensions are installed in both public and topology schemas
-- so types like citext resolve without schema prefix
CREATE SCHEMA IF NOT EXISTS topology;
CREATE EXTENSION IF NOT EXISTS pgcrypto WITH SCHEMA public;
CREATE EXTENSION IF NOT EXISTS citext WITH SCHEMA public;
CREATE EXTENSION IF NOT EXISTS btree_gist WITH SCHEMA public;
CREATE EXTENSION IF NOT EXISTS pgcrypto WITH SCHEMA topology;
CREATE EXTENSION IF NOT EXISTS citext WITH SCHEMA topology;
CREATE EXTENSION IF NOT EXISTS btree_gist WITH SCHEMA topology;