I am working on making my site compatible with SQLite3(so I can demo it live running on my iPhone without having to run MySQL). First I figured out that translatedQuery() is not going to fix a lot of the problems between SQLite and MySQL like the following:
MySQL to SQLite:
Also, all indexes are unique across tables unlike in MySQL in SQLite.
This table seems to fail to find its column named 'weight' with fActiveRecord:
DROP TABLE IF EXISTS css_files;
CREATE TABLE css_files (
cid INT PRIMARY KEY,
filename VARCHAR(128) NOT NULL,
media VARCHAR(128) NOT NULL DEFAULT 'all',
weight INT SIGNED NOT NULL DEFAULT 0
);
CREATE INDEX idx_css_files_filename_media ON css_files (filename, media);
$cssFiles = fRecordSet::build('Base_Css', array(), array('weight' => 'asc'));
if ($cssFiles->count() > 0) {
foreach ($cssFiles as $record) {
$attr['href'] = $baseUrl.$record->getFilename();
$attr['media'] = $record->getMedia();
$this->head->createElement('link', $attr);
}
}
Flourish parts of exception:
#!text/html
Uncaught exception 'fProgrammerException' with message 'The column specified, weight, does not exist in the table css_files' in /private/var/www/sutra/Libraries/Flourish/fSchema.php:2339
Stack trace:
#0 /private/var/www/sutra/Libraries/Flourish/fORMDatabase.php(417): fSchema->getColumnInfo('css_files', 'weight', 'type')
#1 /private/var/www/sutra/Libraries/Flourish/fRecordSet.php(233): fORMDatabase::addOrderByClause(Object(fDatabase), Object(fSchema), Array, 'css_files', Array)
This happened with a column named time for me as well so I renamed that to stamp (thinking it might be a naming conflict with reserved word time) but that didn't actually fix it. Instead it just cannot find the column stamp now.
One other questions regarding Flourish SQL:
Thanks