Page 1 of 1

Code First Migrations - ORA-00972

Posted: Thu 09 Feb 2012 14:30
by ndroe
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.

Posted: Fri 10 Feb 2012 17:57
by Shalex
Thank you for your suggestions. We are investigating the possibility to check the length of the names and to implement the renaming (if necessary). We will post here about the results.

Posted: Wed 15 Feb 2012 15:37
by Shalex
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.

Posted: Fri 17 Feb 2012 09:34
by Shalex
The validation of identifier name length in Code-First Migrations is implemented. We will post here when the corresponding build of dotConnect for Oracle is available for download.

Posted: Mon 27 Feb 2012 14:25
by Shalex
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 .

Incorrect Error

Posted: Mon 05 Mar 2012 12:38
by ndroe
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.

Posted: Mon 05 Mar 2012 15:58
by Shalex
Thank you for your report. We will investigate the issue and notify you about the results.

Posted: Tue 06 Mar 2012 11:26
by Shalex
The bug with validation of identifier name length in Code-First Migrations is fixed. We will post here when the corresponding build of dotConnect for Oracle is available for download.

Posted: Fri 16 Mar 2012 17:45
by Shalex
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 .

Re: Code First Migrations - ORA-00972

Posted: Mon 02 Jul 2012 07:16
by Shalex
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.

Re: Code First Migrations - ORA-00972

Posted: Thu 19 Jul 2012 10:21
by Shalex
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 .