Skip to content

Commit a949497

Browse files
authored
Merge pull request #256 from fact-project/db_cloner_issue_254
Db cloner issue #254
2 parents 9590718 + cc84ae4 commit a949497

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name='shifthelper',
5-
version='1.2.0',
5+
version='1.2.1',
66
description='a tool for helping people with a FACT night shift',
77
url='https://github.com/fact-project/shifthelper',
88
author='Dominik Neise, Maximilian Noethe, Sebastian Mueller',

shifthelper/db_cloner/__main__.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ def main():
8484
table = pd.read_sql_query(query_func(), conn)
8585
# we save the table to a temporary placeholder to make the
8686
# change atomic
87-
table.to_sql('t1', db_out, if_exists="replace")
87+
if table_name == 'calendar_data':
88+
table.to_sql('t1', db_out, if_exists="replace", index=False)
89+
else:
90+
table.to_sql('t1', db_out, if_exists="replace")
8891
db_out.execute('DROP TABLE IF EXISTS t2')
8992
if db_out.dialect.has_table(db_out, table_name):
9093
db_out.execute('RENAME TABLE {t} to t2, t1 to {t}'.format(

0 commit comments

Comments
 (0)