Overview
Comment:Correction bug "FOREIGN KEY constraint failed DELETE FROM compta_categories WHERE id = ?" à la suppression de catégorie qui a été liée par une cotisation
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dev
Files: files | file ages | folders
SHA1: ab04534d5010171253598179562b49c5a9c532f8
User & Date: bohwaz on 2018-11-26 22:39:07
Other Links: branch diff | manifest | tags
Context
2018-11-26
22:54
Merge avec trunk check-in: 6e79e54ca7 user: bohwaz tags: dev
22:39
Correction bug "FOREIGN KEY constraint failed DELETE FROM compta_categories WHERE id = ?" à la suppression de catégorie qui a été liée par une cotisation check-in: ab04534d50 user: bohwaz tags: dev
2018-11-08
11:26
Ajout d'une catégorie et compte pour les licences fédérales check-in: b773d9d766 user: bohwaz tags: dev
Changes

Added src/include/data/0.9.1.sql version [9c2462be3c].





















>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
-- Il manquait une clause ON DELETE SET NULL sur la foreign key
-- de cotisations quand on faisait une mise à jour depuis une
-- ancienne version
ALTER TABLE cotisations RENAME TO cotisations_old;

.read schema.sql

INSERT INTO cotisations SELECT * FROM cotisations_old;

DROP TABLE cotisations_old;

Modified src/www/admin/upgrade.php from [86e6308204] to [fe3b618e90].

248
249
250
251
252
253
254
255


256




257
258
259
260
261
262
263
}

if (version_compare($v, '0.9.1', '<'))
{
    // Mise à jour plan comptable: ajout compte licences fédérales
    $comptes = new Compta\Comptes;
    $comptes->importPlan();



    $db->exec('INSERT INTO "compta_categories" VALUES(NULL,-1,\'Licences fédérales\',\'Licences payées pour les adhérents (par exemple fédération sportive etc.)\',\'652\');');




}

Utils::clearCaches();

$config->setVersion(garradin_version());

Static_Cache::remove('upgrade');








>
>

>
>
>
>







248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
}

if (version_compare($v, '0.9.1', '<'))
{
    // Mise à jour plan comptable: ajout compte licences fédérales
    $comptes = new Compta\Comptes;
    $comptes->importPlan();

    $db->begin();

    $db->exec('INSERT INTO "compta_categories" VALUES(NULL,-1,\'Licences fédérales\',\'Licences payées pour les adhérents (par exemple fédération sportive etc.)\',\'652\');');

    $db->import(ROOT . '/include/data/0.9.1.sql');

    $db->commit();
}

Utils::clearCaches();

$config->setVersion(garradin_version());

Static_Cache::remove('upgrade');