This object is to call sql migration script using peewee
Attributes
migrator: MySQLMigrator
Functions
__init__
Initialize self. See help(type(self)) for accurate signature.
db :
DatabaseProxy
add_column_if_not_exists
model_type :
Type
field :
Field
column_name :
str
Return type :
bool
add_index_if_not_exists
model_type :
Type
index_name :
str
columns :
List
unique :
bool
- False
Return type :
bool
add_migration
operation :
Any
alter_column_type
model_type :
Type
field_name :
str
field :
Field
drop_column_if_exists
model_type :
Type
column_name :
str
Return type :
bool
drop_index_if_exists
model_type :
Type
index_name :
str
Return type :
bool
migrate
rename_column_if_exists
model_type :
Type
old_name :
str
new_name :
str
Return type :
bool
rename_table_if_exists
model_type :
Type
old_name :
str
Return type :
bool
drop_table_if_exists @classmethod
db :
DatabaseProxy
model_type :
Type
Return type :
bool
rename_process_typing_name @classmethod
db :
DatabaseProxy
old_typing_name :
str
new_typing_name :
str
rename_r_field_of_resource_type @classmethod
Rename a field in the resource model for all resources of a given typing name.
resource_typing_name :
str
The typing name of the resource
old_field_name :
str
The name of the field to rename
new_field_name :
str
The new name of the field
rename_resource_model_r_field @classmethod
Rename a field in the resource model for a specific resource model.
resource_model :
ResourceModel
The resource model to update
old_field_name :
str
The name of the field to rename
new_field_name :
str
The new name of the field
rename_resource_typing_name @classmethod
db :
DatabaseProxy
old_typing_name :
str
new_typing_name :
str
set_r_field_of_resource_type @classmethod
Set the value of an R field for all resources of a given typing name.
resource_typing_name :
str
The typing name of the resource
field_name :
str
The name of the field to set
value :
Any
The value to set for the field
set_resource_model_r_field @classmethod
Set the value of an R field for a resource model.
resource_model :
ResourceModel
The resource model to update
field_name :
str
The name of the field to set
value :
Any
The value to set for the field