/** * Compile a drop primary key command. * * @param Schema_Blueprint $blueprint * @param Fluent $command * @return string */ public function compile_drop_primary(Schema_Blueprint $blueprint, Fluent $command) { $table = $blueprint->get_table(); $table = $this->wrap_table($blueprint); return "ALTER TABLE {$table} DROP constraint {$command->index}"; }
/** * Compile a drop primary key command. * * @param Schema_Blueprint $blueprint * @param Fluent $command * @return string */ public function compile_drop_primary(Schema_Blueprint $blueprint, Fluent $command) { $table = $blueprint->get_table(); return 'alter table ' . $this->wrap_table($blueprint) . " drop constraint {$table}_pkey"; }
/** * Create an empty Doctrine DBAL TableDiff from the Blueprint. * * @param Schema_Blueprint $blueprint * @param \Doctrine\DBAL\Schema\AbstractSchemaManager $schema * @return \Doctrine\DBAL\Schema\TableDiff */ protected function _get_doctrine_table_diff(Schema_Blueprint $blueprint, SchemaManager $schema) { $table = $this->get_table_prefix() . $blueprint->get_table(); $table_diff = new TableDiff($table); $table_diff->fromTable = $schema->listTableDetails($table); return $table_diff; }