You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following table. The parent_name_isroot CHECK constraint does not get copied over to postgres. The documentation seems to imply that all constraints are copied over and I can't find an option to specifically include/exclude constraints. Note that primary key and foreign key constraints work fine. This is the syntax I use to create the table in MySQL:
CREATE TABLE a2obj_apps_files_items_item ( id char(16) NOT NULL, parent char(16) DEFAULT NULL, name varchar(255) DEFAULT NULL, isroot tinyint(1) DEFAULT NULL,
PRIMARY KEY (id),
CONSTRAINT parent_name_isroot CHECK (parent is null and name is null and isroot is not null and isroot = 1 or parent is not null and name is not null and isroot is null)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
I have the following table. The
parent_name_isroot
CHECK constraint does not get copied over to postgres. The documentation seems to imply that all constraints are copied over and I can't find an option to specifically include/exclude constraints. Note that primary key and foreign key constraints work fine. This is the syntax I use to create the table in MySQL:CREATE TABLE
a2obj_apps_files_items_item
(id
char(16) NOT NULL,parent
char(16) DEFAULT NULL,name
varchar(255) DEFAULT NULL,isroot
tinyint(1) DEFAULT NULL,PRIMARY KEY (
id
),CONSTRAINT
parent_name_isroot
CHECK (parent
is null andname
is null andisroot
is not null andisroot
= 1 orparent
is not null andname
is not null andisroot
is null)) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
The text was updated successfully, but these errors were encountered: