mirror of
https://github.com/slawkens/myaac.git
synced 2025-12-14 04:49:46 +01:00
Migrations up down
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
<?php
|
||||
// add user_agent column into visitors
|
||||
|
||||
$db->exec('ALTER TABLE `' . TABLE_PREFIX . "visitors` ADD `user_agent` VARCHAR(255) NOT NULL DEFAULT '';");
|
||||
$up = function () use ($db) {
|
||||
$db->exec('ALTER TABLE `' . TABLE_PREFIX . "visitors` ADD `user_agent` VARCHAR(255) NOT NULL DEFAULT '';");
|
||||
};
|
||||
|
||||
$down = function () use ($db) {
|
||||
$db->exec('ALTER TABLE `' . TABLE_PREFIX . "monsters` DROP COLUMN `user_agent`;");
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user