File: 11-check-constraint.sql

package info (click to toggle)
pgcopydb 0.17-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 30,636 kB
  • sloc: ansic: 217,474; sql: 1,654; sh: 812; makefile: 365; python: 94
file content (13 lines) | stat: -rw-r--r-- 327 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
CREATE TABLE public.employees (
    name character varying NOT NULL,
    emp_id uuid
);

--
-- See https://github.com/dimitri/pgcopydb/issues/498
--
-- Migration fails when handling CHECK CONSTRAINT
--

ALTER TABLE public.employees
    ADD CONSTRAINT chk_employees_name_not_abc CHECK (((name)::text !~ 'abc'::text)) NOT VALID;