Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How To Generate Delta Script With Entity Framework Code First on ODP.NET?

1b084ce0-3fa6-4c90-9b26-75e4863e4839May 26 2015 — edited May 26 2015

I would like to use Entity Framework 6 Code First to handle the database migrations for my app. I would like the ability for it to generate a SQL delta script that I can hand off to a DBA to run.

Unfortunately, the SQL that it's generating doesn't look compatible to run with the Oracle database.

When I run the command:

Update-Database -script

This is the output I get:

CREATE TABLE [dbo].[SPA_QUOTES] ( [ID] [bigint] NOT NULL IDENTITY, [ONE] [nvarchar](max) NOT NULL, [TWO] [datetime] NOT NULL, [THREE] [nvarchar](max) NOT NULL, [FOUR] [nvarchar](max) NOT NULL, [FIVE] [nvarchar](max) NOT NULL, [QTY] [bigint] NOT NULL, CONSTRAINT [PK_dbo.SPA_QUOTES] PRIMARY KEY ([ID]) ) CREATE TABLE [dbo].[__MigrationHistory] ( [MigrationId] [nvarchar](150) NOT NULL, [ContextKey] [nvarchar](300) NOT NULL, [Model] [varbinary](max) NOT NULL, [ProductVersion] [nvarchar](32) NOT NULL, CONSTRAINT [PK_dbo.__MigrationHistory] PRIMARY KEY ([MigrationId], [ContextKey]) )

I've pulled in the "Official Oracle ODP.NET, Managed Entity Framework Driv..." from Nuget and I'm using Entity Framework 6.

Thanks.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 23 2015
Added on May 26 2015
1 comment
876 views