-
Notifications
You must be signed in to change notification settings - Fork 20
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
Problem with db migration #70
Comments
Example of problem: |
You've shown a symptom of the problem. You cannot insert a row into the permissions table because the table does not exist. What happens when you attempt the migration that should create the table? |
@rowland I think, i found a problem. The problem is that the created tables wasn't commited to db. And when some statements trying to do something with this tables, it falls with exceptions. Temporal solution for me is to commit every change in metadata. |
Another problem that some queries is incorrect, because some firebird keywords not quoted and not in upcase, when table has columns with keyword names |
Apparently most users of activerecord-fb-adapter color well between the lines, avoiding Firebird reserved words, or use SQL-based migrations like my shop does. The reserved words issue probably wouldn't be too difficult to solve with a judicious modification to the quote_column_name method. The issue of committing schema changes before data operations might depend on whether ActiveRecord has a hook we can tap into. |
@rowland but the problem is, that quote_column_name not called for already defined string with sql ex(count(*) as count) ('where value = 3') and so on |
While it's true that ActiveRecord (at least mostly) does not parse SQL and so raw, database-specific SQL employed by an app may break things for unsupported databases, the examples you cite are unlikely to be a problem. The Firebird convention is to use uppercase identifiers and unquoted identifiers are treated as uppercase. The adapter/driver lowercases resulting column names (except where they are mixed case) to match Rails conventions. At the end of the day, Redmine will not support Firebird unless the team behind it decides to. You may get a particular version working, but the next version may break. |
@rowland Right now i'm trying to make my fork 3.3 of redmine work. Now it is working good, but not all of it's plugins. It is so sad, that redmine developers using hardcoded sql queries |
Fun part that redmine developers said, it is not their problem. |
Trying to use fb adapter with new version of redmine 3.3 (uses rails 4.2.7.1), but can't even migrate db.
The problem is in generated sql queries to firebird. Sometimes no quotes where it is necessary.
The text was updated successfully, but these errors were encountered: