SQLite
Versions
Default Driver
- org.sqlite.JDBC (Java)
- org.sqldroid.SQLDroidDriver (Android)
Jdbc Drivers
- Xerial SQLite JDBC 3.7.15-M1 or later
- SQLDroid 1.0 or later (Android)
Sql Script Syntax
Compatibility
- DDL exported by SQLite can be used unchanged in a Flyway migration.
- Any SQLite sql script executed by Flyway, can be executed by the SQLite tools (after the placeholders have been
replaced).
Example
/* Single line comment */
CREATE TABLE test_data (
value VARCHAR(25) NOT NULL PRIMARY KEY
);
/*
Multi-line
comment
*/
-- Sql-style comment
-- Placeholder
INSERT INTO ${tableName} (name) VALUES ('Mr. T');
CREATE TRIGGER update_customer_address UPDATE OF address ON customers
BEGIN
UPDATE orders SET address = new.address WHERE customer_name = old.name;
END;
Limitations
- No concurrent migration as SQLite does not support SELECT ... FOR UPDATE locking
- No support for multiple schemas or changing the current schema, as SQLite doesn't support schemas
SAP HANA