defaults.py 1.02 KB
Newer Older
1
""" defaults
2 3

    Insert defaults values in the tables
4

5
"""
6
if not db(db.authors_roles).count():
7
    db.authors_roles.insert(id=undef_id, role=undef)
8

9
if not db(db.categories).count():
10
    db.categories.insert(id=undef_id, code=undef, usual=undef, definition=undef)
11

12
if not db(db.collaborations).count():
13
    db.collaborations.insert(id=undef_id, collaboration=undef)
14

15
if not db(db.countries).count():
16
    db.countries.insert(id=undef_id, country=undef)
tux091's avatar
tux091 committed
17

18 19 20
if not db(db.organisation).count():
    db.organisation.insert(id=undef_id, id_teams=undef_id, id_projects=undef_id)

21
if not db(db.projects).count():
22
    db.projects.insert(id=undef_id, project=undef, agencies=undef)
23

24
if not db(db.publishers).count():
25
    db.publishers.insert(id=undef_id, publisher=undef, abbreviation=undef)
26

27
if not db(db.reports).count():
28
    db.reports.insert(id=undef_id, type=undef)
29

30
if not db(db.status).count():
31
    db.status.insert(id=undef_id, code=undef, definition=undef)
32

33
if not db(db.teams).count():
34
    db.teams.insert(id=undef_id, team=undef, domain=undef)