Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exception at 'OBJECT_ID('Enum_TableName', 'U')' when using MySQL/ MariaDB #16

Open
seevali opened this issue Jan 15, 2015 · 2 comments
Open

Comments

@seevali
Copy link

seevali commented Jan 15, 2015

I'm using MariaDB with EF6.

This is the error when running the Update-Database

"You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'IF OBJEC_TID('Enum_TableName', 'U') IS NULL CREATE TABLE [Enum_TableName' at line 1"

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@timabell
Copy link
Owner

Thanks, this project has been written with Sql Server specific SQL embedded in it as you gathered.

Feel free to fork the project and come up with an approach for multiple dbms support. Let me know how you get on if you do.

@timabell
Copy link
Owner

The relevant line is https://github.com/timabell/ef-enum-to-lookup/blob/master/EfEnumToLookup/LookupGenerator/EnumToLookup.cs#L191 but you'll find more things than that in there, that just happens to be the first thing you hit.

timabell added a commit that referenced this issue Feb 21, 2015
To assist with multi-db support

issue #16
timabell added a commit that referenced this issue Feb 21, 2015
* Implements complex type handling. (#17)
* Implements handling of renamed properties/columns (more likely in complex types). (#19)
* Significant refactoring and cleanup.
* Fully test-driven development, with coverage of all the newly supported variations.
* Preparation for handling multiple RDBMSs by factoring out adding interface to db handling (#16)

issue #16
fixes #17
fixes #19
@timabell timabell added this to the v2 milestone Jul 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants