getEnvironment() == "addressdb") { $table = $this->table('WohneinheitDocumentation', ['id' => 'id', 'primary_key' => 'id']); if (!$table->exists()) { $table ->addColumn('wohneinheit_id', 'integer', ['null' => false]) ->addColumn('fileId', 'integer', ['null' => false]) ->addColumn('description', 'text', ['null' => true]) ->addColumn('documentType', 'string', ['limit' => 100, 'null' => false, 'default' => 'photo']) ->addColumn('create', 'integer', ['null' => false]) ->addColumn('createBy', 'integer', ['null' => false]) ->addIndex(['wohneinheit_id'], ['name' => 'wohneinheit_id_idx']) ->addIndex(['fileId'], ['name' => 'fileId_idx']) ->create(); } } } public function down(): void { // AddressDB modifications if ($this->getEnvironment() == "addressdb") { $table = $this->table('WohneinheitDocumentation'); if ($table->exists()) { $table->drop()->save(); } } } }