-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initialize DB with migration #11
Conversation
I'm stuck because am unable to create a unique index. <index>
<name>cg_uri_index</name>
<unique>true</unique>
<field>
<name>uri</name>
<sorting>ascending</sorting>
</field>
</index> Now with Doctrine I define it as: $table->addUniqueIndex(['uri'], 'cg_uri_index'); But MySQL is not happy:
This says that MySQL requires an explicit key length, basically how many of first characters of the field must be indexed: http://stackoverflow.com/a/1827118 However Doctrine doesn't allow you to pass a length for indices: doctrine/orm#3553 (won't fix as too DB specific) I was told on IRC to try with varchar, let's find out how to do that... |
Note that in the MDB2 schema the "uri" column was specified as having the type "text" which is somehow mapped to "TINYTEXT" |
I changed the column type from "text" to "string" and now the index can be created properly. It is now possible to enable this app and get the initial DB ! @DeepDiver1975 @VicDeo @jvillafanez please review |
btw, requires owncloud/core#14851 checked out on master for it to work |
👍 |
Fixes #10