Hi, I want to use the loadUpdateData change type for my existing sqlite database for future data insertions and updates.
I was trying to check how it works before I do it on real data, so I created a test table and inserted to it one record by query execution.
The table named ‘test1’ and includes 2 columns:
-id (int)
-name (string)
Also, I created a demo CSV file with 3 rows to be inserted to the table:
id | name
1 | A
2 | B
3 | C
Other operations are working great, adding new data with the insert change type works great.
But when I’m trying to update the loadUpdateData changeSet I created, it throws a very odd error:
The changeSet I’m trying to update:
The error I get:
Unexpected error running Liquibase: [SQLITE_ERROR] SQL error or missing database (table test1 has no column named id,name) [Failed SQL: (1) INSERT OR REPLACE INTO test1 (“id,name”) VALUES (‘1,A’);]
The weirdest thing is that I did manage two weeks ago to insert data from CSV into a table, although I was using loadData change type, but now both the loadData and the loadUpdateData change types are giving me this error.
more details:
The CSV file is located in the same folder with the changeLogFile.
Liquibase version 4.6.2
Sqlite3 version 3.36.0
My liquibase.properties file looks like this:
changeLogFile: changeLogCurrent.yaml
driver: org.sqlite.JDBC
url: jdbc:sqlite:/Users/donnk/PycharmProjects/NGVDBproject/new_vul_data.db
username: ******
password: *******
referenceDriver: org.sqlite.JDBC
referenceUrl: offline:sqlite=sdk:/Users/donnk/Liquibase/work_with_new_db/mySnapshot2.yaml
referencePassword: *******
classpath: /Users/donnk/Liquibase/work_with_new_db/sqlite-jdbc-3.36.0.3.jar
I found this open issue on GitHub - Additional unfixed issues with relativeToChangelogfile + logicalFilePath · Issue #2281 · liquibase/liquibase · GitHub
But I don’t think that this is what happens in my case.
Does anyone have any suggestions as to how I can solve this?
Thanks,
Katya