Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Jiří Činčura
1. Generator ID. One for all is bad options for me. I'll reimplement it to have one for table. That's why it's open. 2. Couple of errors in creating Constraints or Indexes: unsuccessful metadata update Name longer than database column size Constraint names are longer than it can be in system

Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Jiří Činčura
: Геннадий Забула [mailto:zabulu...@gmail.com] Sent: Tuesday, December 30, 2014 8:19 AM To: For users and developers of the Firebird .NET providers Subject: Re: [Firebird-net-provider] EF Migrations Fall in next query: EXECUTE BLOCK AS BEGIN EXECUTE STATEMENT 'CREATE TABLE

Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Геннадий Забула
into __MigrationHistory right after creation. Disaster. -- Mgr. Jiří Činčura Independent IT Specialist From: Геннадий Забула [mailto:zabulu...@gmail.com] Sent: Tuesday, December 30, 2014 8:19 AM To: For users and developers of the Firebird .NET providers Subject: Re: [Firebird-net-provider

Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Геннадий Забула
I've found out that there is the static class: System.Data.Entity.Infrastructure.Interception.DbInterception, which adds IDbInterceptor, 2014-12-30 11:23 GMT+02:00 Jiří Činčura j...@cincura.net: I'm using the same Context for both MSSQL and Firebird, how deriving from FbDbConfiguration can

Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Геннадий Забула
One more thing about naming indexes conventions. Indexes namespace is global. So if you have several same fields in different tables, you'll have the same name index for both. Good example in three entities with N:M relations: Entity1: eid, name Entity2: eid, name Entity3: eid, name

Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Jiří Činčura
That’s not the same as what AddInterceptor call does. -- Mgr. Jiří Činčura Independent IT Specialist From: Геннадий Забула [mailto:zabulu...@gmail.com] Sent: Tuesday, December 30, 2014 10:36 AM To: For users and developers of the Firebird .NET providers Subject: Re: [Firebird-net-provider] EF

Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Jiří Činčura
The name for index is created by EF if the explicit value is not provided. -- Mgr. Jiří Činčura Independent IT Specialist -- Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and

Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Геннадий Забула
That’s not the same as what AddInterceptor call does. As far as I see in the debugger, MigrationsTransactionsInterceptor is called successfully and failed tests are going further. I've added just one fix to filter just Firebird connections: public void BeginningTransaction(DbConnection

Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Jiří Činčura
Yeah, but it’s different path. The InternalConfiguration class might or might not like that (now or in the future). It’s problem waiting to happen. And please stop sending HTML emails. -- Mgr. Jiří Činčura Independent IT Specialist

Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Геннадий Забула
According to this: http://entityframework.codeplex.com/wikipage?title=Interception As I understand DbConfiguration.AddInterceptor is for context instance interceptions. And DbInterceptors.AddInterceptor is for global-wide interceptions. I suggest moving registration

Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Геннадий Забула
One more question, how can I register custom implementation of IFbMigrationSqlGeneratorBehavior? On Tue, Dec 30, 2014 at 12:55 PM, Геннадий Забула zabulu...@gmail.com wrote: According to this: http://entityframework.codeplex.com/wikipage?title=Interception As I understand

Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Jiří Činčura
or maybe via AddDependencyResolver(new SingletonDependencyResolverIDbInterceptor()) as suggested in documentation: http://msdn.microsoft.com/ru- ru/library/system.data.entity.dbconfiguration.addinterceptor(v=vs.113).asp x), I'd like to do this. But when I register it in provider services, it

Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Jiří Činčura
One more question, how can I register custom implementation of IFbMigrationSqlGeneratorBehavior? Register MigrationSqlGenerator with FbMigrationSqlGenerator and pass the implementation to ctor. Something like: AddDependencyResolver(new SingletonDependencyResolverFuncMigrationSqlGenerator(() =

Re: [Firebird-net-provider] EF Migrations

2014-12-30 Thread Jiří Činčura
I'd like to do this. But when I register it in provider services, it does not work. Not sure why. Ahh. Finally found it. IdbInterceptors are not supported for registration in DbProviderServices. So we're probably left with only DbInterception.Add. I did some research and looks it should work

Re: [Firebird-net-provider] EF Migrations

2014-12-29 Thread Геннадий Забула
Here are my issues/suggestions: 1. Generator ID. One for all is bad options for me. I'll reimplement it to have one for table. 2. Couple of errors in creating Constraints or Indexes: unsuccessful metadata update Name longer than database column size Constraint names are longer than it can be in

Re: [Firebird-net-provider] EF Migrations

2014-12-19 Thread Mercea Paul
On 2014.11.06 3:06 PM, Jiří Činčura wrote: Hi *, Anybody here willing to give EF Migrations a try? I'm getting close to first implementation. I'm trying to add support for Firebird db for existing app on SQL Express, and, first run of the application was with no errors and created the

Re: [Firebird-net-provider] EF Migrations

2014-11-13 Thread Jiří Činčura
Except for identity generation should be done: http://ge.tt/3OSvoR42 . Some feedback? -- Mgr. Jiří Činčura Independent IT Specialist -- Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month.

Re: [Firebird-net-provider] EF Migrations

2014-11-13 Thread Геннадий Забула
Don't have enough time to merge and test it. I look forward to test it and write some feedback on next week. 2014-11-13 18:31 GMT+02:00 Jiří Činčura j...@cincura.net: Except for identity generation should be done: http://ge.tt/3OSvoR42 . Some feedback? -- Mgr. Jiří Činčura Independent IT

Re: [Firebird-net-provider] EF Migrations

2014-11-11 Thread Jiří Činčura
And BTW does anybody has some detailed information about Although this form of EXECUTE STATEMENT can also be used with all kinds of DDL strings (except CREATE/DROP DATABASE), it is generally very, very unwise to use this trick in order to circumvent the no-DDL rule in PSQL., which I'm using to

Re: [Firebird-net-provider] EF Migrations

2014-11-10 Thread Jiří Činčura
So anybody tested migrations? -- Mgr. Jiří Činčura Independent IT Specialist -- Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push

Re: [Firebird-net-provider] EF Migrations

2014-11-09 Thread Геннадий Забула
I've asked about mutual exclusive of schemes. If schemes can be applied in one model you can use custom attributes on primary keys. If schemes are mutual exclusive, you can use custom extension method for model builder. 2014-11-09 13:12 GMT+02:00 Jiří Činčura j...@cincura.net: The update

Re: [Firebird-net-provider] EF Migrations

2014-11-08 Thread Jiří Činčura
Great. Here's http://ge.tt/2Cx9f142?c early implementation. There are two issues which I'm not sure how to do (see below). Rest should work. But there might be some missing space etc. in generated SQL or I might wrote it in different engine's dialect. That's what I'm mostly looking for for

Re: [Firebird-net-provider] EF Migrations

2014-11-08 Thread Геннадий Забула
Can you provide it on github, so I can patch my copy of FB library to use in our project? 1. What problem in Execute block? 2. My opinion for Identity is to copy MSSQL behavior. Create generator for each primary key + trigger before insert. 2014-11-08 14:38 GMT+02:00 Jiří Činčura

Re: [Firebird-net-provider] EF Migrations

2014-11-08 Thread Jiří Činčura
1. What problem in Execute block? It kind of breaks the notion of altering the table/column with one command. It's a bit of magic with system tables and people might get confused or break it by chaning the script. 2. My opinion for Identity is to copy MSSQL behavior. Create generator for

Re: [Firebird-net-provider] EF Migrations

2014-11-06 Thread Геннадий Забула
Sure, waiting for this. 2014-11-06 15:06 GMT+02:00 Jiří Činčura j...@cincura.net: Hi *, Anybody here willing to give EF Migrations a try? I'm getting close to first implementation. -- Mgr. Jiří Činčura Independent IT Specialist

Re: [Firebird-net-provider] EF Migrations

2014-11-06 Thread Mercea Paul
On 2014.11.06 3:06 PM, Jiří Činčura wrote: Hi *, Anybody here willing to give EF Migrations a try? I'm getting close to first implementation. I'm in. Paul MERCEA ___ --