Code First Migrations - ORA-00972
Code First Migrations - ORA-00972
Under the right conditions, the migrations are generating foreign key and index names that are longer than the 30 character maximum for Oracle. I assume this would be the same for table names, column names, etc. too.
Is there any way to handle this in the provider? Could the names be truncated somehow? At a minimum, it would be nice to get an error before executing the migration and getting part way through a schema change that cannot be easily rolled back.
Is there any way to handle this in the provider? Could the names be truncated somehow? At a minimum, it would be nice to get an error before executing the migration and getting part way through a schema change that cannot be easily rolled back.
We have published our article about Code-First Migrations support for Oracle, MySQL, PostgreSQL and SQLite at http://www.devart.com/blogs/dotconnect/ ... qlite.html.
New build of dotConnect for Oracle 6.70.311 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=23469 .
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=23469 .
Incorrect Error
I'm getting the following error:
System.InvalidOperationException: Foreign key name '"FK_Audits_Operators_OperatorId"' in table '"Audits"' is too long. An identifier with more than 30 characters was specified.
Notice that the text between the double quotes is exactly 30 characters long. It looks like the double quotes are being counted in the calculation of the maximum length.
System.InvalidOperationException: Foreign key name '"FK_Audits_Operators_OperatorId"' in table '"Audits"' is too long. An identifier with more than 30 characters was specified.
Notice that the text between the double quotes is exactly 30 characters long. It looks like the double quotes are being counted in the calculation of the maximum length.
New version of dotConnect for Oracle 6.80 is released!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=23639 .
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=23639 .
Re: Code First Migrations - ORA-00972
The config.CodeFirstOptions.TruncateLongDefaultNames configuration option is added (default value is False) to provide the possibility of truncating long default names of indexes, primary keys, foreign keys, triggers, and sequences generated by Code-First Migrations.
We will post here when the corresponding build of dotConnect for Oracle is available for download.
We will post here when the corresponding build of dotConnect for Oracle is available for download.
Re: Code First Migrations - ORA-00972
New version of dotConnect for Oracle 7.1 is released!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=1&t=24522 .
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=1&t=24522 .