QDAirPortBackend0122/sql/create_qaup_database.sql
2026-01-22 13:19:47 +08:00

29 lines
753 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- ============================================
-- 创建QAUP统一数据库
-- 数据库名称qaup
-- 创建时间: 2025-01-15
-- ============================================
-- 创建数据库(如果不存在)
CREATE DATABASE qaup
WITH
OWNER = postgres
ENCODING = 'UTF8'
LC_COLLATE = 'en_US.UTF-8'
LC_CTYPE = 'en_US.UTF-8'
TABLESPACE = pg_default
CONNECTION LIMIT = -1
TEMPLATE = template0;
-- 设置数据库注释
COMMENT ON DATABASE qaup IS '机场车辆管理和碰撞避免统一数据库';
-- 连接到新创建的数据库
\c qaup
-- 启用PostGIS扩展
CREATE EXTENSION IF NOT EXISTS postgis;
CREATE EXTENSION IF NOT EXISTS postgis_topology;
-- 显示PostGIS版本信息
SELECT PostGIS_Version();