3 use Phinx\Migration\AbstractMigration;
4 use Phinx\Db\Adapter\MysqlAdapter;
18 if ($this->hasTable(
"access_collections")) {
22 $table = $this->table(
"access_collections", [
24 'encoding' =>
"utf8mb4",
25 'collation' =>
"utf8mb4_general_ci",
28 $table->addColumn(
'name',
'text', [
32 $table->addColumn(
'owner_guid',
'integer', [
34 'limit' => MysqlAdapter::INT_BIG,
39 $table->addIndex([
'owner_guid'], [
40 'name' =>
"owner_guid",
46 $prefix = $this->getAdapter()->getOption(
'table_prefix');
47 $this->query(
"ALTER TABLE {$prefix}access_collections AUTO_INCREMENT=3");
change()
CREATE TABLE prefix_access_collections ( id int(11) NOT NULL AUTO_INCREMENT, name text NOT NULL,...