-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Azure SQL UUID to Postgres UUID #139
Comments
(closing this as it is not a bug, but info for reference purposes) |
Thanks for the output. This is quite interesting! I will try to detect the newid() function and transform it in uuid_generate_v4(). I then need to add the create extension... There are as well 2 checks that I would like to try to correct: ALTER TABLE "community"."communityperiod" ADD CONSTRAINT "ck_communityperiod_startend" CHECK ((start]<[end));
ALTER TABLE "device"."deviceport" ADD CONSTRAINT "ck_deviceport_opcode" CHECK ((len(opcode)=(2) OR ((opcode='e' OR (opcode='d' OR (opcode='c' OR (opcode='b' OR opcode='a'))))))); corrected to: ALTER TABLE "community"."communityperiod" ADD CONSTRAINT "ck_communityperiod_startend" CHECK (("start"<"end"));
ALTER TABLE "device"."deviceport" ADD CONSTRAINT "ck_deviceport_opcode" CHECK ((LENGTH(opcode)=(2) OR ((opcode='e' OR (opcode='d' OR (opcode='c' OR (opcode='b' OR opcode='a'))))))); Can you give me the table definitions for these constraints? |
Summary of changes I had to make:
Without the cast to varchar I get an error:
I believe the issue here is that we used a I believe these are the definition you requested, from the original SQL Server export:
|
Some of my constraints ended up in tables-unsure.sql. I manually fixed all the issues and the sql script ran without a problem. I however did not check that all the constraints work as expected. For interest sake I attach the original and the modified unsure.sql files.
tables-unsure-modified.sql.txt
tables-unsure.sql.txt
The text was updated successfully, but these errors were encountered: