class Marten::DB::Management::ProjectState
- Marten::DB::Management::ProjectState
- Reference
- Object
Overview
Represents the state of the whole DB schema of the project at a specific step in a migration plan.
Defined in:
marten/db/management/project_state.crConstructors
Class Method Summary
-
.from_apps(apps : Array(Apps::Config))
Initialize a project state from all the current tables of the project applications.
Instance Method Summary
-
#add_table(table : TableState) : Nil
Adds a table state to the current project state.
-
#clone
Returns a clone of the current project state.
-
#delete_table(app_label : String, name : String) : Nil
Deletes a table state from the current project state.
-
#get_table(app_label : String, name : String) : TableState
Returns the table state corresponding to the passed app label and table name.
-
#get_table(id : String) : TableState
Returns the table state corresponding to the passed table ID.
-
#rename_table(app_label : String, old_name : String, new_name : String) : Nil
Renames a specific a table state.
- #tables : Hash(String, Marten::DB::Management::TableState)
Constructor Detail
Class Method Detail
Initialize a project state from all the current tables of the project applications.
Instance Method Detail
Deletes a table state from the current project state.
Returns the table state corresponding to the passed app label and table name.
Returns the table state corresponding to the passed table ID.
Renames a specific a table state.