database-command
database-command copied to clipboard
Add index generation and change PK generation
Dumping table with MySQL gave my duplicate Primary Keys so I changed the generation. Also there was no Index generation so I managed to create function which can do that.
THanks! I noticed it but handled it on the generated script by hand
Is there anything which would break backward compatibility or SQLite support? I left a comment at the code line.
Got an error when dumping a table without PK, eg. AuthAssignment
*** applying m130715_184724_dump
> create table AuthAssignment ...Exception: CDbCommand failed to execute the SQL statement: CDbCommand failed to prepare the SQL statement: SQLSTATE[HY000]: General error: 1 near ")": syntax error. The SQL statement executed was: CREATE TABLE 'AuthAssignment' (
"itemname" varchar(64) NOT NULL,
"userid" varchar(64) NOT NULL,
"bizrule" text,
"data" text,
PRIMARY KEY ()
)
Shouldn't output the last line I think.
schmunk42 feel free to update however you want it, I don't mind. Here is the rep https://github.com/Stamy/database-command. It does completely everything for MySQL, Full FK generation, multiple-keys.
I'll have a detailed look, when I find more time. Thanks.