View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001385 | SymmetricDS | Bug | public | 2013-08-15 14:51 | 2021-08-13 18:34 |
Reporter | douga | Assigned To | chenson | ||
Priority | normal | ||||
Status | resolved | Resolution | fixed | ||
Product Version | 3.5.3 | ||||
Target Version | 3.7.3 | Fixed in Version | 3.7.3 | ||
Summary | 0001385: dbimport fails to create SQLite tables with foreign key restraints | ||||
Description | If the dbimporter is used with an XML input format and a SQLite database it will always fail to generate tables that have foreign key restraints. | ||||
Steps To Reproduce | Setup one of the properties files in the engines folder to use SQLite database: EG db.driver=org.sqlite.JDBC db.url=jdbc:sqlite:/opt/symmetric-ds/store-001/store.sqlite Run dbimporter with sample create file ../bin/dbimport --engine ssm-001 --format XML ../samples/create_sample.xml | ||||
Additional Information | [] - JdbcSqlTemplate - [SQLITE_ERROR] SQL error or missing database (near "CONSTRAINT": syntax error). Failed to execute: ALTER TABLE "item_selling_price" ADD CONSTRAINT "fk_price_item_id" FOREIGN KEY ("item_id") REFERENCES "item" ("item_id") In SQLite foreign key constraint must be specified in table create statement EG CREATE TABLE "item_selling_price" ( ...> "item_id" INTEGER NOT NULL PRIMARY KEY, ...> "store_id" VARCHAR NOT NULL, ...> "price" FLOAT NOT NULL, ...> "cost" FLOAT NOT NULL, ...> FOREIGN KEY(item_id) REFERENCES item(item_id) ...> ); | ||||
Tags | ddl/schema, dialect: sqlite | ||||
|
In 3.12, this is working. I believe it was fixed by Chris's commit here: https://github.com/JumpMind/symmetric-ds/commit/35a4ef9d1ff01d6e78a1673a301707de12394022 for related issue 0002124. |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-08-15 14:51 | douga | New Issue | |
2019-04-22 13:21 | elong | Tag Attached: ddl/schema | |
2019-04-22 13:21 | elong | Tag Attached: sqlite | |
2019-04-23 20:51 | admin | Tag Renamed | sqlite => dialect: sqlite |
2021-08-13 18:32 | rudiejd | Note Added: 0001990 | |
2021-08-13 18:34 | rudiejd | Assigned To | => chenson |
2021-08-13 18:34 | rudiejd | Status | new => resolved |
2021-08-13 18:34 | rudiejd | Resolution | open => fixed |
2021-08-13 18:34 | rudiejd | Fixed in Version | => 3.7.3 |
2021-08-13 18:34 | rudiejd | Relationship added | duplicate of 0002124 |