Lines Matching refs:table
59 $sql = "SELECT name FROM sqlite_master WHERE type = 'table' AND name LIKE 'multi_%'";
63 $table = $row['name']; // no escaping needed, it's our own tables
64 $sql = "ALTER TABLE $table ADD COLUMN latest INT DEFAULT 1";
83 WHERE type = 'table'
96 foreach ($tables as $table) {
97 $name = $table['name'];
98 $sql = $table['sql'];
114 // create the new table
198 foreach ($tables as $table) {
199 $name = $table['name'];
205 // Step 4: remove islookup in schemas table
207 WHERE type = 'table'
217 // create a new table without islookup
304 * Removes a temp table left over by migration 16
332 $sql = "SELECT name FROM sqlite_master WHERE type = 'table' AND (name LIKE 'data_%' OR name LIKE 'multi_%')";
336 $table = $row['name']; // no escaping needed, it's our own tables
337 $sql = "ALTER TABLE $table ADD COLUMN published INT DEFAULT NULL";
357 $sql = "SELECT name FROM sqlite_master WHERE type = 'table' AND (name LIKE 'data_%' OR name LIKE 'multi_%')";
361 $table = $row['name']; // no escaping needed, it's our own tables
362 $sql = "CREATE INDEX idx_$table" . "_latest ON $table(latest);";
364 $sql = "CREATE INDEX idx_$table" . "_published ON $table(published);";