Code First Migrations - ORA-00972

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
ndroe
Posts: 18
Joined: Fri 03 Feb 2012 16:08

Code First Migrations - ORA-00972

Post by ndroe » Thu 09 Feb 2012 14:30

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.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Fri 10 Feb 2012 17:57

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.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 15 Feb 2012 15:37

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.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Fri 17 Feb 2012 09:34

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.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Mon 27 Feb 2012 14:25

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 .

ndroe
Posts: 18
Joined: Fri 03 Feb 2012 16:08

Incorrect Error

Post by ndroe » Mon 05 Mar 2012 12:38

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.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Mon 05 Mar 2012 15:58

Thank you for your report. We will investigate the issue and notify you about the results.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Tue 06 Mar 2012 11:26

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.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Fri 16 Mar 2012 17:45

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 .

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Code First Migrations - ORA-00972

Post by Shalex » Mon 02 Jul 2012 07:16

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.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Code First Migrations - ORA-00972

Post by Shalex » Thu 19 Jul 2012 10:21

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 .

Post Reply