Project

General

Profile

1
#!/bin/bash
2
# :mode=transact-sql:
3
cd "$(dirname "$0")"
4
. ../../../lib/import.sh
5

    
6
map_table
7
psql <<'EOF'
8
SELECT set_col_types('"REF_UNIT"', ARRAY[
9
  ('STATECD', 'integer')
10
, ('UNITCD', 'integer')
11
]::col_cast[]);
12

    
13
SELECT create_if_not_exists($$ALTER TABLE "REF_UNIT" ADD CONSTRAINT "REF_UNIT.unique" UNIQUE ("STATECD", "UNITCD")$$);
14
EOF
15
mk_derived
(3-3/6)