I migrated our application from MySQL to SQLite using mysql2sqlite.sh.
I updated our PDO connection string and it continues to work without issue for some weeks but whilst browsing the database using DB Browser for SQLite I came across something odd; it appears the script didn't update the data types to be SQLite compatible, but it continues to work. How is this?
Table
CREATE TABLE `events` (
`id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
`Forename` varchar(255) NOT NULL,
`Surname` varchar(255) NOT NULL,
`Site` TEXT,
`Badge` varchar(255) NOT NULL,
`Start` datetime NOT NULL,
`End` datetime NOT NULL,
`Created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
);
How does it continue to work without issue whilst using MySQL data types?
According to SQLite documentation most of these data types don't exist in SQLite but it continues to work.
Should I alter the data types to TEXT
or something else supported by SQLite?
Update
According to SQLite documentation, these are data types:
INTEGER
TEXT
BLOB
REAL
NUMERIC
but it continues to work without issue using:
varchar(255)
datetime
timestamp
How is this?