-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
Add schema support #222
Comments
did you do research other than PostgreSQL? I would love to have this if it's possible |
I think only PostgreSQL and MSSQL support this, tho I have not used MSSQL for quite some time already :) |
Looks like MySQL driver also support db creation for sqlite3, maybe we can just connect to db and schema will be created, for deleting schema, we can delete the file |
First step would be probably just implement for ones who support schemas and for others just print warnings Maybe for MySQL and sqlite3 use schema as prefix for table names? |
ah, looks like I miss understood schema for database 🤦
if there's a way to make this API not available in this adapter maybe better, like making the how about application usage? how will it refer to correct schema? |
If you want to use multiple schemas in single app search_path is not very useful. Migration is just one part - if adapter does not support it can just ignore these commands. |
sorry for late respond 🙏 what do you think if we use |
There will be problem handling this in adapters if only Table() is used as in sqlite and mysql schema should be used as prefix instead. |
I was thinking we don't have to support compatibility for all adapters, because even if we make it compatible for repository, I don't think there's a way to make it compatible for migration since table name is defined manually. so I think it's about how far we want to support the compatibility, is it okay for migration to be not compatible? is it okay for this feature to be adapter specific? 🤔 |
Probably it would be ok also to use "." in Table for this and mysql, sqlite that does not support schemas could just use schema as table prefix |
sounds good to me |
Looks like better as option in |
Currently there is no way at least for migrations to create/drop schemas for databases that support them like PostgreSQL
The text was updated successfully, but these errors were encountered: