
-- Ici il faut taper le nom de votre BD
USE staging;

-- Mettre à jour les BC
UPDATE mdl_rsg_coord_office SET officename='BC CPE LE MANÈGE DES TOUT-PETITS INC.' WHERE id=30;
UPDATE mdl_rsg_coord_office SET officename='BC GARDE MILIEU FAMILIAL DE BORDEAUX-CARTIERVILLE' WHERE id=46;
UPDATE mdl_rsg_coord_office SET officename='B.C. ST-MICHEL' WHERE id=57;
UPDATE mdl_rsg_coord_office SET officename='B.C. CAVENDISH' WHERE id=54;
DELETE from mdl_rsg_coord_office WHERE id=134;

-- Modifier les ID des BC
UPDATE mdl_rsg_coord_office SET officeid='7000-6994' WHERE id=1;
UPDATE mdl_rsg_coord_office SET officeid='7000-6915' WHERE id=2;
UPDATE mdl_rsg_coord_office SET officeid='7000-6975' WHERE id=3;
UPDATE mdl_rsg_coord_office SET officeid='7000-6928' WHERE id=4;
UPDATE mdl_rsg_coord_office SET officeid='7000-6849' WHERE id=5;
UPDATE mdl_rsg_coord_office SET officeid='7000-7014' WHERE id=6;
UPDATE mdl_rsg_coord_office SET officeid='7000-6873' WHERE id=7;
UPDATE mdl_rsg_coord_office SET officeid='7000-7038' WHERE id=8;

UPDATE mdl_rsg_coord_office SET officeid='7000-6938' WHERE id=9;
UPDATE mdl_rsg_coord_office SET officeid='7000-7010' WHERE id=10;
UPDATE mdl_rsg_coord_office SET officeid='7000-6780' WHERE id=11;
UPDATE mdl_rsg_coord_office SET officeid='7000-7033' WHERE id=12;
UPDATE mdl_rsg_coord_office SET officeid='7000-6784' WHERE id=13;
UPDATE mdl_rsg_coord_office SET officeid='7000-6800' WHERE id=14;
UPDATE mdl_rsg_coord_office SET officeid='7000-6979' WHERE id=15;

UPDATE mdl_rsg_coord_office SET officeid='7000-6786' WHERE id=16;
UPDATE mdl_rsg_coord_office SET officeid='7000-6920' WHERE id=17;
UPDATE mdl_rsg_coord_office SET officeid='7000-6930' WHERE id=18;
UPDATE mdl_rsg_coord_office SET officeid='7000-7144' WHERE id=19;
UPDATE mdl_rsg_coord_office SET officeid='7000-6908' WHERE id=20;
UPDATE mdl_rsg_coord_office SET officeid='7000-7045' WHERE id=21;
UPDATE mdl_rsg_coord_office SET officeid='7000-7078' WHERE id=22;
UPDATE mdl_rsg_coord_office SET officeid='7000-6949' WHERE id=23;
UPDATE mdl_rsg_coord_office SET officeid='7000-7004' WHERE id=24;
UPDATE mdl_rsg_coord_office SET officeid='7000-6942' WHERE id=25;
UPDATE mdl_rsg_coord_office SET officeid='7000-6990' WHERE id=26;
UPDATE mdl_rsg_coord_office SET officeid='7000-6927' WHERE id=27;
UPDATE mdl_rsg_coord_office SET officeid='7000-7131' WHERE id=28;
UPDATE mdl_rsg_coord_office SET officeid='7000-6948' WHERE id=29;

UPDATE mdl_rsg_coord_office SET officeid='7001-4718' WHERE id=30;
UPDATE mdl_rsg_coord_office SET officeid='7000-6811' WHERE id=31;
UPDATE mdl_rsg_coord_office SET officeid='7000-6995' WHERE id=32;
UPDATE mdl_rsg_coord_office SET officeid='7000-6847' WHERE id=33;
UPDATE mdl_rsg_coord_office SET officeid='7000-6984' WHERE id=34;
UPDATE mdl_rsg_coord_office SET officeid='7000-7137' WHERE id=35;
UPDATE mdl_rsg_coord_office SET officeid='7000-6910' WHERE id=36;

UPDATE mdl_rsg_coord_office SET officeid='7001-4728' WHERE id=37;
UPDATE mdl_rsg_coord_office SET officeid='7000-7110' WHERE id=38;
UPDATE mdl_rsg_coord_office SET officeid='7000-7107' WHERE id=39;
UPDATE mdl_rsg_coord_office SET officeid='7000-6929' WHERE id=40;
UPDATE mdl_rsg_coord_office SET officeid='7000-7115' WHERE id=41;
UPDATE mdl_rsg_coord_office SET officeid='7000-6822' WHERE id=42;
UPDATE mdl_rsg_coord_office SET officeid='7000-7026' WHERE id=43;
UPDATE mdl_rsg_coord_office SET officeid='7000-6852' WHERE id=44;
UPDATE mdl_rsg_coord_office SET officeid='7001-5594' WHERE id=45;

UPDATE mdl_rsg_coord_office SET officeid='7000-7021' WHERE id=46;
UPDATE mdl_rsg_coord_office SET officeid='7000-6914' WHERE id=47;
UPDATE mdl_rsg_coord_office SET officeid='7000-7067' WHERE id=48;
UPDATE mdl_rsg_coord_office SET officeid='7000-7168' WHERE id=49;
UPDATE mdl_rsg_coord_office SET officeid='7000-7116' WHERE id=50;
UPDATE mdl_rsg_coord_office SET officeid='7000-7178' WHERE id=51;
UPDATE mdl_rsg_coord_office SET officeid='7000-7035' WHERE id=52;
UPDATE mdl_rsg_coord_office SET officeid='7000-6886' WHERE id=53;
UPDATE mdl_rsg_coord_office SET officeid='7000-7387' WHERE id=54;
UPDATE mdl_rsg_coord_office SET officeid='7000-7171' WHERE id=55;
UPDATE mdl_rsg_coord_office SET officeid='7000-6973' WHERE id=56;
UPDATE mdl_rsg_coord_office SET officeid='7000-7113' WHERE id=57;
UPDATE mdl_rsg_coord_office SET officeid='7000-6902' WHERE id=58;
UPDATE mdl_rsg_coord_office SET officeid='7000-6885' WHERE id=59;
UPDATE mdl_rsg_coord_office SET officeid='7000-7109' WHERE id=60;
UPDATE mdl_rsg_coord_office SET officeid='7000-7059' WHERE id=61;
UPDATE mdl_rsg_coord_office SET officeid='7000-7028' WHERE id=62;
UPDATE mdl_rsg_coord_office SET officeid='7000-7136' WHERE id=63;
UPDATE mdl_rsg_coord_office SET officeid='7000-7081' WHERE id=64;

UPDATE mdl_rsg_coord_office SET officeid='7000-6877' WHERE id=65;
UPDATE mdl_rsg_coord_office SET officeid='7000-7165' WHERE id=66;
UPDATE mdl_rsg_coord_office SET officeid='7000-6946' WHERE id=67;
UPDATE mdl_rsg_coord_office SET officeid='7000-6900' WHERE id=68;
UPDATE mdl_rsg_coord_office SET officeid='7000-7170' WHERE id=69;
UPDATE mdl_rsg_coord_office SET officeid='7000-7007' WHERE id=70;
UPDATE mdl_rsg_coord_office SET officeid='7000-6918' WHERE id=71;
UPDATE mdl_rsg_coord_office SET officeid='7000-7159' WHERE id=72;
UPDATE mdl_rsg_coord_office SET officeid='7000-6815' WHERE id=73;

UPDATE mdl_rsg_coord_office SET officeid='7000-7228' WHERE id=74;
UPDATE mdl_rsg_coord_office SET officeid='7000-6993' WHERE id=75;
UPDATE mdl_rsg_coord_office SET officeid='7000-6935' WHERE id=76;
UPDATE mdl_rsg_coord_office SET officeid='7000-6840' WHERE id=77;
UPDATE mdl_rsg_coord_office SET officeid='7000-6810' WHERE id=78;
UPDATE mdl_rsg_coord_office SET officeid='7000-6916' WHERE id=79;

UPDATE mdl_rsg_coord_office SET officeid='7000-7051' WHERE id=80;
UPDATE mdl_rsg_coord_office SET officeid='7000-6924' WHERE id=81;
UPDATE mdl_rsg_coord_office SET officeid='7000-7210' WHERE id=82;
UPDATE mdl_rsg_coord_office SET officeid='7000-6804' WHERE id=83;
UPDATE mdl_rsg_coord_office SET officeid='7000-6921' WHERE id=84;
UPDATE mdl_rsg_coord_office SET officeid='7000-6792' WHERE id=85;

UPDATE mdl_rsg_coord_office SET officeid='7000-7057' WHERE id=86;
UPDATE mdl_rsg_coord_office SET officeid='7000-7056' WHERE id=87;
UPDATE mdl_rsg_coord_office SET officeid='7000-7174' WHERE id=88;
UPDATE mdl_rsg_coord_office SET officeid='7001-3359' WHERE id=89;

UPDATE mdl_rsg_coord_office SET officeid='7000-6960' WHERE id=90;
UPDATE mdl_rsg_coord_office SET officeid='7000-6794' WHERE id=91;
UPDATE mdl_rsg_coord_office SET officeid='7000-6968' WHERE id=92;
UPDATE mdl_rsg_coord_office SET officeid='7000-6934' WHERE id=93;
UPDATE mdl_rsg_coord_office SET officeid='7000-7031' WHERE id=94;
UPDATE mdl_rsg_coord_office SET officeid='7000-6912' WHERE id=95;

UPDATE mdl_rsg_coord_office SET officeid='7000-6807' WHERE id=96;
UPDATE mdl_rsg_coord_office SET officeid='7000-6940' WHERE id=97;
UPDATE mdl_rsg_coord_office SET officeid='7000-6846' WHERE id=98;
UPDATE mdl_rsg_coord_office SET officeid='7001-5462' WHERE id=99;
UPDATE mdl_rsg_coord_office SET officeid='7000-6992' WHERE id=100;
UPDATE mdl_rsg_coord_office SET officeid='7000-7134' WHERE id=101;
UPDATE mdl_rsg_coord_office SET officeid='7000-6909' WHERE id=102;
UPDATE mdl_rsg_coord_office SET officeid='7000-6834' WHERE id=103;
UPDATE mdl_rsg_coord_office SET officeid='7000-7153' WHERE id=104;
UPDATE mdl_rsg_coord_office SET officeid='7000-6803' WHERE id=105;
UPDATE mdl_rsg_coord_office SET officeid='7000-6843' WHERE id=106;
UPDATE mdl_rsg_coord_office SET officeid='7000-7065' WHERE id=107;

UPDATE mdl_rsg_coord_office SET officeid='7000-6911' WHERE id=108;
UPDATE mdl_rsg_coord_office SET officeid='7000-6828' WHERE id=109;
UPDATE mdl_rsg_coord_office SET officeid='7000-7036' WHERE id=110;
UPDATE mdl_rsg_coord_office SET officeid='7000-6917' WHERE id=111;
UPDATE mdl_rsg_coord_office SET officeid='7000-6977' WHERE id=112;
UPDATE mdl_rsg_coord_office SET officeid='7000-6974' WHERE id=113;

UPDATE mdl_rsg_coord_office SET officeid='7000-6837' WHERE id=114;
UPDATE mdl_rsg_coord_office SET officeid='7000-6986' WHERE id=115;
UPDATE mdl_rsg_coord_office SET officeid='7000-7098' WHERE id=116;
UPDATE mdl_rsg_coord_office SET officeid='7000-7072' WHERE id=117;
UPDATE mdl_rsg_coord_office SET officeid='7000-7132' WHERE id=118;
UPDATE mdl_rsg_coord_office SET officeid='7000-6813' WHERE id=119;
UPDATE mdl_rsg_coord_office SET officeid='7000-7135' WHERE id=120;
UPDATE mdl_rsg_coord_office SET officeid='7000-6818' WHERE id=121;
UPDATE mdl_rsg_coord_office SET officeid='7000-6868' WHERE id=122;

UPDATE mdl_rsg_coord_office SET officeid='7000-6889' WHERE id=123;
UPDATE mdl_rsg_coord_office SET officeid='7000-7000' WHERE id=124;
UPDATE mdl_rsg_coord_office SET officeid='7000-6933' WHERE id=125;
UPDATE mdl_rsg_coord_office SET officeid='7000-6901' WHERE id=126;
UPDATE mdl_rsg_coord_office SET officeid='7000-7209' WHERE id=127;
UPDATE mdl_rsg_coord_office SET officeid='7000-6896' WHERE id=128;
UPDATE mdl_rsg_coord_office SET officeid='7000-7164' WHERE id=129;
UPDATE mdl_rsg_coord_office SET officeid='7000-6950' WHERE id=130;
UPDATE mdl_rsg_coord_office SET officeid='7000-7085' WHERE id=131;
UPDATE mdl_rsg_coord_office SET officeid='7000-7121' WHERE id=132;

UPDATE mdl_rsg_coord_office SET officeid='7000-7227' WHERE id=133;
UPDATE mdl_rsg_coord_office SET officeid='7000-7108' WHERE id=135;
UPDATE mdl_rsg_coord_office SET officeid='7000-7096' WHERE id=136;
UPDATE mdl_rsg_coord_office SET officeid='7000-6987' WHERE id=137;
UPDATE mdl_rsg_coord_office SET officeid='7000-7080' WHERE id=138;
UPDATE mdl_rsg_coord_office SET officeid='7000-7105' WHERE id=139;
UPDATE mdl_rsg_coord_office SET officeid='7000-6824' WHERE id=140;
UPDATE mdl_rsg_coord_office SET officeid='7000-7091' WHERE id=141;
UPDATE mdl_rsg_coord_office SET officeid='7000-6816' WHERE id=142;
UPDATE mdl_rsg_coord_office SET officeid='7000-7018' WHERE id=143;
UPDATE mdl_rsg_coord_office SET officeid='7000-7024' WHERE id=144;
UPDATE mdl_rsg_coord_office SET officeid='7000-7042' WHERE id=145;
UPDATE mdl_rsg_coord_office SET officeid='7000-6801' WHERE id=146;
UPDATE mdl_rsg_coord_office SET officeid='7000-7064' WHERE id=147;
UPDATE mdl_rsg_coord_office SET officeid='7000-6897' WHERE id=148;
UPDATE mdl_rsg_coord_office SET officeid='7000-7068' WHERE id=149;
UPDATE mdl_rsg_coord_office SET officeid='7000-6978' WHERE id=150;
UPDATE mdl_rsg_coord_office SET officeid='7000-6853' WHERE id=151;
UPDATE mdl_rsg_coord_office SET officeid='7000-6963' WHERE id=152;
UPDATE mdl_rsg_coord_office SET officeid='7000-6881' WHERE id=153;
UPDATE mdl_rsg_coord_office SET officeid='7001-4744' WHERE id=154;
UPDATE mdl_rsg_coord_office SET officeid='7001-2512' WHERE id=155;
UPDATE mdl_rsg_coord_office SET officeid='7000-6882' WHERE id=156;
UPDATE mdl_rsg_coord_office SET officeid='7000-7111' WHERE id=157;
UPDATE mdl_rsg_coord_office SET officeid='7000-6862' WHERE id=158;

UPDATE mdl_rsg_coord_office SET officeid='7000-6956' WHERE id=159;
UPDATE mdl_rsg_coord_office SET officeid='7000-6790' WHERE id=160;
UPDATE mdl_rsg_coord_office SET officeid='7000-6884' WHERE id=161;
UPDATE mdl_rsg_coord_office SET officeid='7000-6953' WHERE id=162;
UPDATE mdl_rsg_coord_office SET officeid='7000-6980' WHERE id=163;

-- Rendre la colonne "officeid" unique
ALTER IGNORE TABLE mdl_rsg_coord_office ADD UNIQUE (officeid);

-- Renommer la colonne "matricule" pour "numeroidentification" de la table mdl_rsg_inscription
ALTER TABLE mdl_rsg_inscription CHANGE COLUMN matricule numeroidentification VARCHAR(255) NOT NULL;

-- Renommer la colonne "officiel" pour "active" de la table mdl_rsg_inscription
ALTER TABLE mdl_rsg_inscription CHANGE COLUMN officiel active TINYINT(1) NOT NULL DEFAULT 0;

-- Effacer les tables mdl_rsg_abonnement et mdl_rsg_transaction
