-
-
Notifications
You must be signed in to change notification settings - Fork 528
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
sea-orm-cli migrate
for Postgres database schema
#981
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @nahuakang, sorry for the confusion. Here is what I want to do. Please check master...demo-migration-connection and see if that make any sense :)
.unwrap_or_else(handle_error), | ||
} => run_migrate_command( | ||
command, | ||
database_schema.as_str(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think is better to use &database_schema
Hey @nahuakang, regarding your question on how to add schema name prefix to pub trait SchemaDefinitionStatement {
fn get_table_name(&self) -> Option<&TableRef>;
fn set_table_name(&self) -> &mut Self;
fn prefix_table_name_with_schema<A>(&mut self, schema: A) -> &mut Self
where
A: IntoIden + 'static;
} Following types should implement the new
Also, we need a helper method to apply the schema name on the impl TableRef {
pub fn schema<A>(self, schema: A) -> Self
where
A: IntoIden + 'static,
{
match self {
...
}
}
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @nahuakang, I find a way to achieve the same thing with less code. Please check #1056
Hey @billy1624 So #1056 Can close this one? :) Thanks! |
Hey @nahuakang, I will close this in favour of #1056. Thanks for the contributions as always! :) |
@billy1624 Thank you! I'll pick up where I left off on |
Thanks!! @nahuakang Take your time :D |
PR Info
Adds
Fixes
Changes