To connect to an existing SQL server 2017 database, I followed the steps in https://github.com/cuba-platform/cuba-vision-clinic/wiki. I got through step 3 and when attempting to launch the application, (step 4), Cuba studio advised that the database needed updating, so I attempted to do this. The scripts generated by the system are problematic. The first round attempted to create required columns which SQL complains about when the table contains data. So I deleted all data in all tables and reran update database. Some of the scripts ran, but then the system errors on a script:
This script reads as follows:
alter table "AreaPositions" add constraint FK_AREAPOSITIONS_ON_AREAID foreign key ("AreaID") references "Areas"(\"AreaID\"); create index IDX_AREAPOSITIONS_ON_AREAID on "AreaPositions" ("AreaID");
I can see what’s wrong - the back slashed around AreaID - “Areas”(“AreaID”). So I open the script in notepad, remove the back slashes and rerun update database. Cuba puts the back slashes back in. I can’t figure out how to open DB Manager without deleting existing scripts.
What’s going on here? Are there bugs with this process? How can I open DB Manger to edit the scripts in Cuba Studio? Any suggestions?