Commit 47d8984e by JonathanMM

Ajout du stockage de overflow et overflowActivation

parent d664d963
......@@ -61,8 +61,8 @@ def getAllStation():
nbFreeEDock = int(etatStation['nbFreeDock'])+int(etatStation['nbFreeEDock'])
nbEDock = int(etatStation['nbDock'])+int(etatStation['nbEDock'])
requete = mysql.cursor()
requete.execute('INSERT INTO status (code, idConso, state, nbBike, nbEBike, nbFreeEDock, nbEDock, nbBikeOverflow, nbEBikeOverflow, maxBikeOverflow) VALUES \
('+str(codeStation)+', '+strIdConso+', "'+str(infoStation['state'])+'", '+str(nbBike)+', '+str(nbEbike)+', '+str(nbFreeEDock)+', '+str(nbEDock)+', '+str(etatStation['nbBikeOverflow'])+', '+str(etatStation['nbEBikeOverflow'])+', '+str(etatStation['maxBikeOverflow'])+')')
requete.execute('INSERT INTO status (code, idConso, state, nbBike, nbEBike, nbFreeEDock, nbEDock, nbBikeOverflow, nbEBikeOverflow, maxBikeOverflow, overflow, overflowActivation) VALUES \
('+str(codeStation)+', '+strIdConso+', "'+str(infoStation['state'])+'", '+str(nbBike)+', '+str(nbEbike)+', '+str(nbFreeEDock)+', '+str(nbEDock)+', '+str(etatStation['nbBikeOverflow'])+', '+str(etatStation['nbEBikeOverflow'])+', '+str(etatStation['maxBikeOverflow'])+', "'+str(etatStation['overflow'])+'", "'+str(etatStation['overflowActivation'])+'")')
#On met à jour la station au besoin
if codeStation in stationsFutur and nbEDock > 0:
......
......@@ -122,7 +122,9 @@ CREATE TABLE `status` (
`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
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
......
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