createTable('{{%minecraft_access_keys}}', [ 'access_token' => $this->string(36)->notNull(), 'client_token' => $this->string(36)->notNull(), 'account_id' => $this->db->getTableSchema('{{%accounts}}')->getColumn('id')->dbType . ' NOT NULL', 'created_at' => $this->integer()->unsigned()->notNull(), 'updated_at' => $this->integer()->unsigned()->notNull(), ]); $this->addPrimaryKey('access_token', '{{%minecraft_access_keys}}', 'access_token'); $this->addForeignKey('FK_minecraft_access_token_to_account', '{{%minecraft_access_keys}}', 'account_id', '{{%accounts}}', 'id', 'CASCADE', 'CASCADE'); $this->createIndex('client_token', '{{%minecraft_access_keys}}', 'client_token', true); } public function safeDown(): void { $this->dropTable('{{%minecraft_access_keys}}'); } }