3 use Phinx\Migration\AbstractMigration;
4 use Phinx\Db\Adapter\MysqlAdapter;
19 if ($this->hasTable(
"api_users")) {
23 $table = $this->table(
"api_users", [
25 'encoding' =>
"utf8mb4",
26 'collation' =>
"utf8mb4_general_ci",
29 $table->addColumn(
'api_key',
'string', [
34 $table->addColumn(
'secret',
'string', [
39 $table->addColumn(
'active',
'integer', [
42 'limit' => MysqlAdapter::INT_REGULAR,
46 $table->addIndex([
'api_key'], [
change()
CREATE TABLE prefix_api_users ( id int(11) NOT NULL AUTO_INCREMENT, api_key varchar(40) DEFAULT NULL,...