Re: [Firebird-net-provider] EF Migrations
> 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. The update script should not be changed by users generated by migration. Or maybe I don't know something? > MSSQL has identities. Given that there are at least two widely used schemes in Firebird community and nothing is in the engine itself, I'd like to keep this open, with some default implementation. We need to inject some implementation through dependency injection, or make it configurable. EF have some built-in dependency injector. Does community schemes mentioned above are mutual exclusive for database instance? 2014-11-08 18:36 GMT+02:00 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 each primary key + trigger before insert. > > MSSQL has identities. Given that there are at least two widely used > schemes in Firebird community and nothing is in the engine itself, I'd like > to keep this open, with some default implementation. > > -- > Mgr. Jiří Činčura > Independent IT Specialist > > > > -- > ___ > Firebird-net-provider mailing list > Firebird-net-provider@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider > -- ___ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Re: [Firebird-net-provider] EF Migrations
> 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 > each primary key + trigger before insert. MSSQL has identities. Given that there are at least two widely used schemes in Firebird community and nothing is in the engine itself, I'd like to keep this open, with some default implementation. -- Mgr. Jiří Činčura Independent IT Specialist -- ___ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Re: [Firebird-net-provider] EF Migrations
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 : > 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 this > testing. > > For easiest testing is enough to install EntityFramework.Firebird package > and then replace EntityFramework.Firebird.dll reference with the one from > above link. The class is FbMigrationSqlGenerator, if you'd like to try it > manually. > > Issues: > 1. Not easy to drop NOT NULL constraint in alter table. I can do it with > "execute block" and generate it there, but seems pretty ugly. I wish > Firebird 3 was here. > 2. Generating "identity" columns. It's not directly supported in Firebird. > I can at least generate "#PK_GEN#" comment. But I'd like to offer some > warning at least that you need to create your own trigger and use/create > generator. Maybe some developer-provided factory to create/alter the > trigger and create/use generator would work. I'm open for ideas. > > -- > Mgr. Jiří Činčura > Independent IT Specialist > > -- > ___ > Firebird-net-provider mailing list > Firebird-net-provider@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/firebird-net-provider > -- ___ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
Re: [Firebird-net-provider] EF Migrations
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 this testing. For easiest testing is enough to install EntityFramework.Firebird package and then replace EntityFramework.Firebird.dll reference with the one from above link. The class is FbMigrationSqlGenerator, if you'd like to try it manually. Issues: 1. Not easy to drop NOT NULL constraint in alter table. I can do it with "execute block" and generate it there, but seems pretty ugly. I wish Firebird 3 was here. 2. Generating "identity" columns. It's not directly supported in Firebird. I can at least generate "#PK_GEN#" comment. But I'd like to offer some warning at least that you need to create your own trigger and use/create generator. Maybe some developer-provided factory to create/alter the trigger and create/use generator would work. I'm open for ideas. -- Mgr. Jiří Činčura Independent IT Specialist -- ___ Firebird-net-provider mailing list Firebird-net-provider@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/firebird-net-provider