Commit 16168c19 by JonathanMM

Ajout du statut d'overflow dans le dump

parent 47d8984e
......@@ -61,7 +61,9 @@ def creerDumpData(dateDebut):
`nbEDock` int(3) NOT NULL,
`nbBikeOverflow` int(3) NOT NULL,
`nbEBikeOverflow` int(3) NOT NULL,
`maxBikeOverflow` int(3) NOT NULL
`maxBikeOverflow` int(3) NOT NULL,
`overflow` varchar(4) DEFAULT NULL,
`overflowActivation` varchar(4) DEFAULT NULL
);
''')
c.execute('''
......@@ -97,7 +99,7 @@ def creerDumpData(dateDebut):
c = conn.cursor()
requete = mysql.cursor()
requete.execute('SELECT s.id, s.code, s.idConso, s.state, s.nbBike, s.nbEBike, s.nbFreeEDock, s.nbEDock, s.nbBikeOverflow, s.nbEBikeOverflow, s.maxBikeOverflow \
requete.execute('SELECT s.id, s.code, s.idConso, s.state, s.nbBike, s.nbEBike, s.nbFreeEDock, s.nbEDock, s.nbBikeOverflow, s.nbEBikeOverflow, s.maxBikeOverflow, s.overflow, s.overflowActivation \
FROM status s \
INNER JOIN `statusConso` c ON c.id = s.idConso \
WHERE (c.`date` >= "'+dateDebutStr+'" AND c.`date` < "'+dateFinStr+'")')
......@@ -106,7 +108,7 @@ def creerDumpData(dateDebut):
values = []
for cell in statut:
values.append(val(cell))
c.execute('INSERT INTO status (id, code, idConso, state, nbBike, nbEBike, nbFreeEDock, nbEDock, nbBikeOverflow, nbEBikeOverflow, maxBikeOverflow) VALUES \
c.execute('INSERT INTO status (id, code, idConso, state, nbBike, nbEBike, nbFreeEDock, nbEDock, nbBikeOverflow, nbEBikeOverflow, maxBikeOverflow, overflow, overflowActivation) VALUES \
('+', '.join(values)+')')
conn.commit()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment