Skip to content

Commit 3c6840d

Browse files
committed
Fixing up the strings
1 parent 00448c8 commit 3c6840d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

export-laravel-5-migrations.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,21 +75,21 @@ def export_schema(out, schema, is_main_schema):
7575
else:
7676
col_type = 'INCREMENTS'
7777

78-
col_data = "'"
78+
col_data = '\''
7979
if typesDict[col_type] == 'char':
8080
if col.length > -1:
81-
col_data = "', " + str(col.length)
81+
col_data = '\', %s' % (str(col.length))
8282
elif typesDict[col_type] == 'decimal':
8383
if col.precision > -1 and col.scale > -1:
84-
col_data = "', " + str(col.precision) + ", " + str(col.scale)
84+
col_data = '\', %s, %s' % (str(col.precision), str(col.scale))
8585
elif typesDict[col_type] == 'double':
8686
if col.precision > -1 and col.length > -1:
87-
col_data = "', " + str(col.length) + ", " + str(col.precision)
87+
col_data = '\', %s, %s' % (str(col.length), str(col.precision))
8888
elif typesDict[col_type] == 'enum':
89-
col_data = "', [" + col.datatypeExplicitParams[1:-1] + "]"
89+
col_data = '\', [%s]' % (col.datatypeExplicitParams[1:-1])
9090
elif typesDict[col_type] == 'string':
9191
if col.length > -1:
92-
col_data = "', " + str(col.length)
92+
col_data = '\', %s' % (str(col.length))
9393

9494
if(typesDict[col_type]) :
9595
migrations[tbl.name].append(' $table->%s(\'%s%s)' % (typesDict[col_type], col.name, col_data))

0 commit comments

Comments
 (0)