Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
dmapi / usr / lib / python2.7 / dist-packages / dmapi / db / sqlalchemy / utils.pyc
Size: Mime:
ó

[dc@sËddlmZddlmZddlmZddl	m
Z
ddlmZddlm
Z
ddlmZddlmZddlmZdd	lmZejeƒZd
„Zddd„ZdS(
iÿÿÿÿ(t	exception(tutils(tlog(tOperationalError(tMetaData(tTable(tNullType(tapi(t_c
Cs‹tƒ}||_t||dtƒ}ttj||dtƒ}d„|jDƒ}d„|jDƒ}x¿t|jƒƒD]«\}}||krÁt	j
tdƒi|d6|jd6ƒ‚n||}	t
|	jt|jƒƒs|t	j
tdƒi|d6|jd6|jd6|	jd	6ƒ‚q|q|WxYt|jƒƒD]E\}}||kr>t	j
td
ƒi|d6|jd6ƒ‚q>q>WtS(slThis method checks that table with ``table_name`` and
    corresponding shadow table have same columns.
    tautoloadcSsi|]}||j“qS((tname(t.0tc((s=/usr/lib/python2.7/dist-packages/dmapi/db/sqlalchemy/utils.pys
<dictcomp>s	cSsi|]}||j“qS((R
(RR((s=/usr/lib/python2.7/dist-packages/dmapi/db/sqlalchemy/utils.pys
<dictcomp> s	s3Missing column %(table)s.%(column)s in shadow tabletcolumnttablesVDifferent types in %(table)s.%(column)s and shadow table: %(c_type)s %(shadow_c_type)stc_typet
shadow_c_types1Extra column %(table)s.%(column)s in shadow table(RtbindRtTruetdbt_SHADOW_TABLE_PREFIXtcolumnstlisttitemsRtContegoExceptionRR
t
isinstancettype(
tmigrate_enginet
table_nametmetaRtshadow_tableRtshadow_columnsR
R
t
shadow_column((s=/usr/lib/python2.7/dist-packages/dmapi/db/sqlalchemy/utils.pytcheck_shadow_tables2				
	
	"c
Ks´td|ƒ}|d	kr?|d	kr?tjtdƒƒ‚n|d	kpT|d	ksotjtdƒƒ‚n|d	kr“t||dtƒ}ng}x[|jD]P}t|j	t
ƒràtj||j
ƒ}|j|ƒq£|j|jƒƒq£Wtj|j
}t||dd|Œ}	y|	jƒ|	SWn|tjtfk
rtjt|	ƒƒtjdƒtjd|ƒ‚n1tk
r¯tjt|	ƒƒtjdƒnXd	S(
sThis method create shadow table for table with name ``table_name``
    or table instance ``table``.
    :param table_name: Autoload table with this name and create shadow table
    :param table: Autoloaded table, so just create corresponding shadow table.
    :param col_name_col_instance:   contains pair column_name=column_instance.
    column_instance is instance of Column. These params are required only for
    columns that have unsupported types by sqlite. For example BigInteger.
    :returns: The created shadow_table object.
    Rs%Specify `table_name` or `table` params+Specify only one param `table_name` `table`R	tmysql_enginetInnoDBsException while creating table.R
N(RtNoneRRRRRRRRRtoslodbutilst_get_not_supported_columnR
tappendtcopyRRtcreatetdb_exctDBErrorRtLOGtinfotreprtShadowTableExistst	Exception(
RRRtcol_name_col_instanceRRR
t
new_columntshadow_table_nameR((s=/usr/lib/python2.7/dist-packages/dmapi/db/sqlalchemy/utils.pytcreate_shadow_table9s6


N(toslo_dbRR*toslo_db.sqlalchemyRR%toslo_logRtloggingtsqlalchemy.excRt
sqlalchemyRRtsqlalchemy.typesRtdmapi.db.sqlalchemyRRtdmapit
dmapi.i18nRt	getLoggert__name__R,R!R$R4(((s=/usr/lib/python2.7/dist-packages/dmapi/db/sqlalchemy/utils.pyt<module>s	%