This repository has been archived on 2024-06-26. You can view files and clone it, but cannot push or open issues or pull requests.
sakura/migrations/2015_04_19_125809_action_codes.php
2016-02-19 22:49:00 +01:00

27 lines
800 B
PHP

<?php
use Sakura\Migration\IMigration;
use Sakura\DB;
class ActionCodes implements IMigration
{
public function up()
{
// Create the profile fields table
DB::prepare("CREATE TABLE `{prefix}actioncodes` (
`id` bigint(255) NOT NULL AUTO_INCREMENT,
`action` varchar(255) COLLATE utf8_bin NOT NULL,
`userid` bigint(255) NOT NULL,
`actkey` varchar(255) COLLATE utf8_bin NOT NULL,
`instruction` varchar(255) COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin")
->execute();
}
public function down()
{
// Drop the profile fields table
DB::prepare("DROP TABLE `{prefix}actioncodes`")
->execute();
}
}