Back to bricks list
Introduction
Technical Documentation
Other Classes
SqlMigrator
Version

SqlMigrator

This object is to call sql migration script using peewee

Attributes

migrator: MySQLMigrator

Functions

__INIT__

Initialize self. See help(type(self)) for accurate signature.

Parameters:
NameTypeDefault valueDescription
dbDatabaseProxy
ADD_COLUMN_IF_NOT_EXISTS
Parameters:
NameTypeDefault valueDescription
model_typeType
fieldField
column_namestr
Return type:
bool
ADD_INDEX_IF_NOT_EXISTS
Parameters:
NameTypeDefault valueDescription
model_typeType
index_namestr
columnsList
uniquebool False
Return type:
bool
ADD_MIGRATION
Parameters:
NameTypeDefault valueDescription
operationAny
ALTER_COLUMN_TYPE
Parameters:
NameTypeDefault valueDescription
model_typeType
field_namestr
fieldField
DROP_COLUMN_IF_EXISTS
Parameters:
NameTypeDefault valueDescription
model_typeType
column_namestr
Return type:
bool
DROP_INDEX_IF_EXISTS
Parameters:
NameTypeDefault valueDescription
model_typeType
index_namestr
Return type:
bool
MIGRATE
RENAME_COLUMN_IF_EXISTS
Parameters:
NameTypeDefault valueDescription
model_typeType
old_namestr
new_namestr
Return type:
bool
RENAME_TABLE_IF_EXISTS
Parameters:
NameTypeDefault valueDescription
model_typeType
old_namestr
Return type:
bool
DROP_TABLE_IF_EXISTS - @classmethod
Parameters:
NameTypeDefault valueDescription
dbDatabaseProxy
model_typeType
Return type:
bool
RENAME_PROCESS_TYPING_NAME - @classmethod
Parameters:
NameTypeDefault valueDescription
dbDatabaseProxy
old_typing_namestr
new_typing_namestr
RENAME_RESOURCE_TYPING_NAME - @classmethod
Parameters:
NameTypeDefault valueDescription
dbDatabaseProxy
old_typing_namestr
new_typing_namestr