SQL General error – 1553 Cannot drop index XYZ needed in a foreign key constraint
9. Februar 2016
Kommentare deaktiviert für SQL General error – 1553 Cannot drop index XYZ needed in a foreign key constraint By webpirat
// show indexes of table SHOW CREATE TABLE news; // shows something like this ... CONSTRAINT `FK_3A51546D12469DE2` FOREIGN KEY (`category_id`) REFERENCES `news_category` (`id`), ... // drop index ALTER TABLE news DROP FOREIGN KEY FK_3A51546D12469DE2;
alter table, constraint, drop, foreign key, general error, index, MySQL, sql
doctrine create and drop table on the fly by orm
24. Januar 2012
Kommentare deaktiviert für doctrine create and drop table on the fly by orm By webpirat
um in doctrine erst in der app tables anzulegen oder auch zu droppen kannst du ein yaml schema
MyTestOrm: tableName: my_test_table columns: id: type: integer(8) primary: true autoincrement: true unsigned: true title: type: string(255) notnull: true created_at: type: timestamp notnull: true indexes: id: fields: [id] title: fields: [title]
anlegen und die orms daraus generieren.
dann kannst du in deiner app die table für die orm anlegen
Doctrine::createTablesFromArray( array( 'MyTestOrm' ) );
bzw. auch wieder droppen
$table = Doctrine_Core::getTable('MyTestOrm'); $export = new Doctrine_Export(); $export->dropTable($table->getTableName());
Neueste Beiträge
Kategorien
- Agavi
- Android
- ANT
- Apache
- Bildbearbeitung
- CMS Systeme
- Codeigniter
- CSS
- Debugging
- Deployment
- Doctrine ORM
- Flash
- Frameworks
- GIT
- Javascript
- Kanban
- Kohana
- Layout & Styles
- Lightroom
- Lighttpd
- Linux
- Management & Prozesse
- MySQL
- Nginx
- OffTopic
- Photographie
- Photoshop
- PHP
- PhpMyAdmin
- PHPUnit
- Postfix
- Propel ORM
- Ruby On Rails
- Scrum
- Server
- Shell
- Sicherheit
- SOAP
- Social Media
- Sonata
- SVN
- Symfony2
- Versionierung
- VIM
- Wordpress
- XDebug
- XML
- XT Commerce
- Zend