Commit a4500ea3 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Modify the database schema by adding the field synonyms in collaborations,...

Modify the database schema by adding the field synonyms in collaborations, countries and publishers tables.
parent f0670efa
docs/db_schema/database.png

167 KB | W: | H:

docs/db_schema/database.png

167 KB | W: | H:

docs/db_schema/database.png
docs/db_schema/database.png
docs/db_schema/database.png
docs/db_schema/database.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -36,6 +36,9 @@
<row name="abbreviation" null="0" autoincrement="0">
<datatype>string</datatype>
</row>
<row name="synonyms" null="1" autoincrement="0">
<datatype>text</datatype>
<default>NULL</default></row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
......@@ -160,6 +163,9 @@
<row name="country" null="0" autoincrement="0">
<datatype>string</datatype>
</row>
<row name="synonyms" null="1" autoincrement="0">
<datatype>text</datatype>
<default>NULL</default></row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
......@@ -209,13 +215,16 @@
<part>id</part>
</key>
</table>
<table x="418" y="82" name="collaborations">
<table x="408" y="70" name="collaborations">
<row name="id" null="0" autoincrement="1">
<datatype>integer</datatype>
</row>
<row name="collaboration" null="0" autoincrement="0">
<datatype>string</datatype>
</row>
<row name="synonyms" null="1" autoincrement="0">
<datatype>text</datatype>
<default>NULL</default></row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
......
......@@ -332,6 +332,7 @@
'List of collections separated by comma: LHCb Papers, LHCb Talks': 'Liste des collections separé par une virgule : LHCb Papers, LHCb Talks',
'List of directors separated by comma: J. Doe, P.-Y. Smith': 'Noms des directeurs de thèse separé par une virgule: J. Doe, P.-Y. Smith',
'List of sections separated by a comma: Articles, Proceedings.': 'Liste de sections separé par une virgule: Articles, Proceedings.',
'List of synonyms separated by comma.': 'Liste de synonymes séparés par une virgule.',
'List of university separated by comma': 'Liste des universités séparé par une virgule',
'List shorted by AERES category, by project and by year': 'Liste triée par catégorie AERES par projet et par année',
'List shorted by usual category, by team and by year': 'Liste triée par catégorie usuelle par équipe et par année',
......@@ -595,6 +596,7 @@
'substitution mechanism: {tablename.fieldname} or {foreigntablename.fieldname}': 'régle de substitution : {tablename.fieldname} or {foreigntablename.fieldname}',
'Sum of publications': 'Somme des publications',
'Summary per collections': 'Résumé par collection',
'Synonyms': 'Synonymes',
'Sélectionner une "catégorie" !!!': 'Sélectionner une "catégorie" !!!',
'table': 'table',
'Tablename': 'Table',
......
......@@ -9,8 +9,12 @@ T("Collaboration(s) signing the publication: "
"Heavy Flavour Averaging Group or "
"CTA Consortium.")
tp_synonyms = \
T("List of synonyms separated by comma.")
db.define_table("collaborations",
Field("collaboration", "string", length=255, comment=tp_collaboration, notnull=True, unique=True),
Field("synonyms", "text", comment=tp_synonyms),
migrate="collaborations.table")
db.collaborations._before_delete.append(INHIBIT_CASCADE_DELETE)
......
# -*- coding: utf-8 -*-
""" countries
""" countries
"""
db.define_table("countries",
Field("country", "string", length=255, notnull=True, unique=True),
Field("synonyms", "text", comment=tp_synonyms),
migrate="countries.table")
db.countries._before_delete.append(INHIBIT_CASCADE_DELETE)
......
......@@ -5,6 +5,7 @@
db.define_table("publishers",
Field("publisher", "string", length=255, default="", label="Review"),
Field("abbreviation", "string", length=255, notnull=True, unique=True),
Field("synonyms", "text", comment=tp_synonyms),
migrate="publishers.table")
db.publishers._before_delete.append(INHIBIT_CASCADE_DELETE)
......
......@@ -11,9 +11,6 @@ T("List of collections separated by comma: LHCb Papers, LHCb Talks")
tp_host = \
T("Address of the invenio store where the search is performed.")
tp_ratio = \
T("Parameter for fuzzy string search.")
tp_scan = \
T("Authorize automatic scan.")
......@@ -23,7 +20,6 @@ db.define_table("harvesters",
Field("controller", "string", length=255, comment=tp_controller, label='Automaton', notnull=True),
Field("host", "string", length=255, comment=tp_host, default=STORES[0], label='Store', notnull=True),
Field("collections", "string", length=255, comment=tp_collections, notnull=True),
Field("ratio", "double", comment=tp_ratio, default=1.0, notnull=True),
Field("id_categories", "reference categories", comment=tp_category, label='Category', notnull=True),
Field("scan", "boolean", comment=tp_scan, default=False),
migrate="harvesters.table")
......@@ -36,4 +32,3 @@ db.harvesters.host.filter_in = dbui.CLEAN_SPACES
db.harvesters.controller.requires = IS_IN_DB(db, 'controllers.controller')
db.harvesters.host.requires = IS_IN_SET(STORES)
db.harvesters.ratio.requires = IS_FLOAT_IN_RANGE(0., 1.0)
# -*- coding: utf-8 -*-
""" countries
""" countries
"""
#-------------------------------------------------------------------------------
......@@ -20,6 +20,8 @@
#
#-------------------------------------------------------------------------------
gridModifier = dbui.GridModifier('countries')
gridModifier.configure_column('country', width=50)
gridModifier.append_filter(('country', 'contains', T('contains')))
gridModifier.configure_filters(plugins=['pFormToolTip'], width=300)
gridModifier.configure_gridWithFilter(selectorTitle= T('Filter'))
......
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