1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
<?php namespace Zotlabs\Update; class _1074 { function run() { $r1 = q("ALTER TABLE `site` ADD `site_sync` DATETIME NOT NULL AFTER `site_update` "); $r2 = q("ALTER TABLE `updates` ADD `ud_last` DATETIME NOT NULL DEFAULT '0001-01-01 00:00:00' AFTER `ud_date` , ADD INDEX ( `ud_last` ) "); if($r1 && $r2) return UPDATE_SUCCESS; return UPDATE_FAILED; } }