建立5178独立项目基线
verify / booking-verify (push) Has been cancelled

This commit is contained in:
鲨鱼辣椒 committed 2026-09-08 15:03:45 +08:00
commit 31849411a8
1578 files changed
+290463

No files matched your search

@@ -0,0 +1,48 @@
\set ON_ERROR_STOP on
BEGIN READ ONLY;
SELECT
current_database() AS current_database,
current_user AS current_user,
n.nspname AS schema_name,
pg_get_userbyid(n.nspowner) AS schema_owner,
has_schema_privilege(current_user, n.oid, 'USAGE') AS can_use,
has_schema_privilege(current_user, n.oid, 'CREATE') AS can_create_objects
FROM pg_namespace n
WHERE n.nspname = 'th_hotel_booking';
SELECT version, description, installed_by, installed_at
FROM th_hotel_booking.schema_migration
ORDER BY version;
SELECT
c.relkind,
c.relname AS object_name
FROM pg_class c
JOIN pg_namespace n ON n.oid = c.relnamespace
WHERE n.nspname = 'th_hotel_booking'
ORDER BY c.relkind, c.relname;
SELECT
n.nspname AS schema_name,
c.relkind,
count(*) AS object_count
FROM pg_class c
JOIN pg_namespace n ON n.oid = c.relnamespace
WHERE n.nspname NOT LIKE 'pg_%'
AND n.nspname <> 'information_schema'
GROUP BY n.nspname, c.relkind
ORDER BY n.nspname, c.relkind;
SELECT
conrelid::regclass::text AS constrained_table,
confrelid::regclass::text AS referenced_table,
conname
FROM pg_constraint
WHERE contype = 'f'
AND connamespace = 'th_hotel_booking'::regnamespace
AND confrelid::regclass::text NOT LIKE 'th_hotel_booking.%'
ORDER BY constrained_table, conname;
COMMIT;