1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-12-05 04:18:03 +01:00
vichan/tools/migrate_cycle.php

13 lines
363 B
PHP
Raw Normal View History

2015-04-03 08:57:47 +02:00
<?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) {
2015-04-04 03:51:10 +02:00
echo "Processing board $b...";
2015-04-03 08:57:47 +02:00
query(sprintf('ALTER TABLE ``posts_%s`` ADD COLUMN cycle INT(1) NOT NULL AFTER locked', $b));
}