PHP
return [
// drop old tables
PartialDatabaseTable::create('seo1_agency_category')
->drop(),
// create new tables
DatabaseTable::create('seo1_agency_category')
->columns([
NotNullInt10DatabaseTableColumn::create('categoryID')
->autoIncrement(),
NotNullVarchar255DatabaseTableColumn::create('name'),
VarcharDatabaseTableColumn::create('className')
->length(255),
TinyintDatabaseTableColumn::create('special')
->length(1)
->defaultValue(0)
->notNull(),
]),
];
Display More
Ich versuche gerade über die PHP Database API eine Tabelle zu droppen und dann neu zu erstellen. Rename/Droppen der einzelnen Spalten ist leider keine Option, da es zu viele sind.
Problem: Die Installation läuft und läuft, die Tabelle wird neu erstellt und dann wieder gedroppt. Ist das ein Bug?
Log:
Code
[1645007462]
sequenceNo: 0
nodeType: pip
nodeData:
attributes: {"type":"database","run":"standalone"}
pip: database
value: acp/database/agency_category2.php
------------------------------
[1645007462]
sequenceNo: 0
nodeType: pip
nodeData:
attributes: {"type":"database","run":"standalone"}
pip: database
value: acp/database/agency_category2.php
additional information: split node: Dropped table 'seo1_agency_category'.
------------------------------
[1645007462]
sequenceNo: 0
nodeType: pip
nodeData:
attributes: {"type":"database","run":"standalone"}
pip: database
value: acp/database/agency_category2.php
------------------------------
[1645007462]
sequenceNo: 0
nodeType: pip
nodeData:
attributes: {"type":"database","run":"standalone"}
pip: database
value: acp/database/agency_category2.php
additional information: split node: Created table 'seo1_agency_category'.
------------------------------
[1645007462]
sequenceNo: 0
nodeType: pip
nodeData:
attributes: {"type":"database","run":"standalone"}
pip: database
value: acp/database/agency_category2.php
------------------------------
[1645007462]
sequenceNo: 0
nodeType: pip
nodeData:
attributes: {"type":"database","run":"standalone"}
pip: database
value: acp/database/agency_category2.php
additional information: split node: Dropped table 'seo1_agency_category'.
------------------------------
[1645007463]
sequenceNo: 0
nodeType: pip
nodeData:
attributes: {"type":"database","run":"standalone"}
pip: database
value: acp/database/agency_category2.php
------------------------------
[1645007463]
sequenceNo: 0
nodeType: pip
nodeData:
attributes: {"type":"database","run":"standalone"}
pip: database
value: acp/database/agency_category2.php
additional information: split node: Created table 'seo1_agency_category'.
------------------------------
Display More