fixed schema creation
This commit is contained in:
@@ -43,6 +43,13 @@ const std::string& object::alias() const {
|
||||
|
||||
void object::update_name(const std::string& name) {
|
||||
name_ = name;
|
||||
for (auto& con : constraints_) {
|
||||
if (con.is_primary_key_constraint()) {
|
||||
con.name_ += name;
|
||||
} else if (con.is_foreign_key_constraint()) {
|
||||
con.name_ = "FK_" + name + "_" + con.column_name();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool object::has_attributes() const {
|
||||
|
||||
Reference in New Issue
Block a user