1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-12-04 20:08:02 +01:00
vichan/tools/migrate_cycle.php
2015-04-03 18:51:10 -07:00

13 lines
363 B
PHP

<?php
require dirname(__FILE__) . '/inc/cli.php';
# edited_at column was using DATETIME when time column uses INT(11). This script solves that.
$boards = listBoards(TRUE);
#$boards = array('test2');
foreach ($boards as $i => $b) {
echo "Processing board $b...";
query(sprintf('ALTER TABLE ``posts_%s`` ADD COLUMN cycle INT(1) NOT NULL AFTER locked', $b));
}