Skip to content
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

Restore of the switch to EOSchemaSynchronizationFactory. Warning: #566

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

spelletier
Copy link
Member

The migration can fail with invalid identifier because the column names are not quoted. I searched but cannot find where to fix this problem.

… migration can fail with invalid identifier because the column names are not quoted. I searched but cannot find where to fix this problem.
@spelletier
Copy link
Member Author

I spend some time trying to figure where to add the quote on the column identifiers in create table statement without success. The table name itself should also be quoted.

In KAAccessControlDemo, one of the table fail:

CREATE TABLE User(id INTEGER NOT NULL, language VARCHAR(10) NOT NULL, passwordHash VARCHAR(200), username VARCHAR(100) NOT NULL);

User is a reserved word, language is also but is OK in this situation but all identifiers should be quoted.

The primary key generation miss the quote too:
ALTER TABLE UserT ADD PRIMARY KEY (id);

And the foreign Key:
ALTER TABLE KAUserProfile ADD CONSTRAINT KAUserProfile_user_id_id_FK FOREIGN KEY (user_id) REFERENCES UserT (id)

But unique index are OK:
ALTER TABLE "UserT" ADD CONSTRAINT "UNIQUE_UserT__username" UNIQUE("username") DEFERRABLE INITIALLY DEFERRED

Not null constraints are not created with specified names, just NOT NULL added to the column definition.

@spelletier
Copy link
Member Author

The _dbupdater created by the migration class is correctly generated and use the EOSchemaSynchronizationFactory. Table created in my migration class does not.

CREATE TABLE "_dbupdater" ( "lockowner" VARCHAR(100), "modelname" VARCHAR(100) CONSTRAINT NOT_NULL__dbupdater__modelname NOT NULL, "updatelock" INTEGER CONSTRAINT NOT_NULL__dbupdater__updatelock NOT NULL, "version" INTEGER CONSTRAINT NOT_NULL__dbupdater__version NOT NULL )

@rkiddy
Copy link
Member

rkiddy commented Jun 17, 2014

If this is just a revert of a previous commit, can someone pick this up? I would, but I cannot test any FB stuff.

@darkv darkv added the Wonder7 label Jan 8, 2015
@aacirino
Copy link
Contributor

aacirino commented May 4, 2015

Perhaps my new pull request have solved the issues reported here. Please refer to #640

@paulhoadley
Copy link
Contributor

By way of update here, #640 was closed without merging, so it won't be helping here.

If this affects only FrontBasePlugIn, and @spelletier uses it and is happy with it, I suggest we merge. I can't test FrontBase, and I don't know that many people can.

@hprange
Copy link
Contributor

hprange commented Jan 15, 2022

Unfortunately, we need to solve the conflicts before merging this pull request. 😕 @spelletier is this pull request still relevant to you? Can you update it if it is? We're going to merge it as long as it has no conflicts and somebody has tested it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants