Overview
Comment:Ajout foreign key id_exercice sur les comptes
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dev
Files: files | file ages | folders
SHA1: 9ac4c864954d92f0385d154c5992906b4e6d1b1a
User & Date: bohwaz on 2020-01-17 13:22:59
Other Links: branch diff | manifest | tags
Context
2020-01-17
13:23
Adaptation à KD2\AbstractEntity check-in: 1f3d435c32 user: bohwaz tags: dev
13:22
Ajout foreign key id_exercice sur les comptes check-in: 9ac4c86495 user: bohwaz tags: dev
13:11
Transformation des ID de comptes en codes vers des ID auto-incrémentés, ouvrant la porte à avoir plusieurs comptes avec le même code check-in: be95994256 user: bohwaz tags: dev
Changes

Modified src/include/data/schema.sql from [2dfcef7a46] to [845385bf90].

193
194
195
196
197
198
199
200

201
202
203
204
205
206
207
193
194
195
196
197
198
199

200
201
202
203
204
205
206
207







-
+









CREATE TABLE IF NOT EXISTS compta_comptes
-- Plan comptable
(
    id INTEGER NOT NULL PRIMARY KEY,
    code TEXT NOT NULL, -- peut contenir des lettres, eg. 53A, 53B, etc.
    parent INTEGER NOT NULL DEFAULT 0,
    parent INTEGER NULL REFERENCES compta_comptes(id),

    libelle TEXT NOT NULL,

    position INTEGER NOT NULL, -- position actif/passif/charge/produit
    plan_comptable INTEGER NOT NULL DEFAULT 1, -- 1 = fait partie du plan comptable original, 0 = a été ajouté par l'utilisateur
    id_exercice INTEGER NULL REFERENCES compta_exercices (id)
    -- Quand un exercice est clôturé, on copie les comptes utilisés dans cet exercice, avec id_exercice renseigné