Commit 64474dfa authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Migrate to web2py 2.9.5 (define the length of all string Fields for backward

compatibility)
parent 78888e75
# coding: utf8
# -*- coding: utf-8 -*-
{
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN',
'%Y-%m-%d': '%Y-%m-%d',
......@@ -150,7 +150,9 @@
'Email sent': 'Email sent',
'Email verification': 'Email verification',
'enter a number between %(min)g and %(max)g': 'enter a number between %(min)g and %(max)g',
'Enter a number between %(min)g and %(max)g': 'Enter a number between %(min)g and %(max)g',
'enter a valid URL': 'Entrer un URL valide',
'Enter an integer between %(min)g and %(max)g': 'Enter an integer between %(min)g and %(max)g',
'enter an integer between %(min)g and %(max)g': 'entrez un entier entre %(min)g et %(max)g',
'enter an integer greater than or equal to %(min)g': 'entrez un entier plus grand ou égual à %(min)g',
'Error !!!': 'Erreur !!!',
......@@ -435,6 +437,7 @@
'The volume number: 123 or 64-65': 'Numéro du volume : 123 ou 64-65',
'The XML string describing the MARC12 record. It Starts with "<?xml" and ends with "</collection>"': 'Chaîne de charactère XML définissant un enregistrement MARC12. Elle commence par "<?xml" et fini par "</collection>"',
'Thesis': 'Thèses',
'This email already has an account': 'This email already has an account',
'Ticket': 'Ticket',
'Time': 'Temps',
'Timestamp': 'Timestamp',
......
......@@ -5,8 +5,7 @@
"""
db.define_table("authors_roles",
Field("role", "string", notnull=True, unique=True),
Field("definition", "text", default="", notnull=True),
Field("role", "string", length=255, default="", notnull=True),
migrate="authors_roles.table")
db.authors_roles._before_delete.append(INHIBIT_CASCADE_DELETE)
\ No newline at end of file
......@@ -7,6 +7,6 @@
"""
db.define_table("axes",
Field("axis", "string", notnull=True),
Field("granularity", "string", notnull=True),
Field("axis", "string", length=255, notnull=True),
Field("granularity", "string", length=255, notnull=True),
migrate="axes.table")
\ No newline at end of file
......@@ -4,8 +4,8 @@
"""
db.define_table("categories",
Field("code", "string", notnull=True, unique=True),
Field("usual", "string", default=""),
Field("code", "string", length=255, notnull=True, unique=True),
Field("usual", "string", length=255, default=""),
Field("definition", "text", notnull=True),
migrate="categories.table")
......
......@@ -3,7 +3,7 @@
"""
db.define_table("collaborations",
Field("collaboration", "string", notnull=True, unique=True),
Field("collaboration", "string", length=255, notnull=True, unique=True),
migrate="collaborations.table")
db.collaborations._before_delete.append(INHIBIT_CASCADE_DELETE)
......
......@@ -15,7 +15,7 @@ tp_controller = \
T("The name of the web2py controller to run a search: articles, proceedings,...")
db.define_table("controllers",
Field("controller", "string", comment=tp_controller, notnull=True),
Field("controller", "string", length=255, comment=tp_controller, notnull=True),
Field("id_categories", "reference categories", comment=tp_category, default=undef_id, label='Category'),
migrate="controllers.table")
......
......@@ -3,7 +3,7 @@
"""
db.define_table("countries",
Field("country", "string", notnull=True, unique=True),
Field("country", "string", length=255, notnull=True, unique=True),
migrate="countries.table")
db.countries._before_delete.append(INHIBIT_CASCADE_DELETE)
......
......@@ -3,8 +3,8 @@
"""
db.define_table("projects",
Field("project", "string", notnull=True, unique=True),
Field("agencies", "string", default=""),
Field("project", "string", length=255, notnull=True, unique=True),
Field("agencies", "string", length=255, default=""),
migrate="projects.table")
db.projects._before_delete.append(INHIBIT_CASCADE_DELETE)
......
......@@ -3,8 +3,8 @@
"""
db.define_table("publishers",
Field("publisher", "string", default="", label="Review"),
Field("abbreviation", "string", notnull=True, unique=True),
Field("publisher", "string", length=255, default="", label="Review"),
Field("abbreviation", "string", length=255, notnull=True, unique=True),
migrate="publishers.table")
db.publishers._before_delete.append(INHIBIT_CASCADE_DELETE)
......
......@@ -13,7 +13,7 @@ T("String containing blabla and the database fields to be displayed. "
"The substitution mechanism is: {tablename.fieldname} or {foreigntablename.fieldname}")
db.define_table("renderers",
Field("renderer", "string", notnull=True),
Field("renderer", "string", length=255, notnull=True),
Field("template", "text", comment=tp_template, notnull=True),
Field("postprocessing", "text", comment=tp_postprocessing, default=""),
Field("definition", "text", default=""),
......
......@@ -3,7 +3,7 @@
"""
db.define_table("reports",
Field("type", "string", notnull=True, unique=True),
Field("type", "string", length=255, notnull=True, unique=True),
migrate="reports.table")
db.reports._before_delete.append(INHIBIT_CASCADE_DELETE)
\ No newline at end of file
......@@ -3,7 +3,7 @@
"""
db.define_table("status",
Field("code", "string", notnull=True, unique=True),
Field("code", "string", length=255, notnull=True, unique=True),
Field("definition", "text", notnull=True),
migrate="status.table")
......
......@@ -3,8 +3,8 @@
"""
db.define_table("teams",
Field("team", "string", notnull=True, unique=True),
Field("domain", "string", default=""),
Field("team", "string", length=255, notnull=True, unique=True),
Field("domain", "string", length=255, default=""),
migrate="teams.table")
db.teams._before_delete.append(INHIBIT_CASCADE_DELETE)
......
......@@ -17,9 +17,9 @@ T("Parameter for fuzzy string search.")
db.define_table("harvesters",
Field("id_teams", "reference teams", label='Team', notnull=True),
Field("id_projects", "reference projects", label='Project', notnull=True),
Field("controller", "string", comment=tp_controller, label='Harvest', notnull=True),
Field("host", "string", comment=tp_host, default='cdsweb.cern.ch', label='Store', notnull=True),
Field("collections", "string", comment=tp_collections, default=""),
Field("controller", "string", length=255, comment=tp_controller, label='Harvest', notnull=True),
Field("host", "string", length=255, comment=tp_host, default='cdsweb.cern.ch', label='Store', notnull=True),
Field("collections", "string", length=255, comment=tp_collections, default=""),
Field("ratio", "double", comment=tp_ratio, default=1.0, notnull=True),
Field("id_categories", "reference categories", comment=tp_category, default=undef_id, label='Category'),
migrate="harvesters.table")
......
......@@ -13,21 +13,21 @@ tp_sections = \
T("List of sections separated by a comma: Articles, Proceedings.")
db.define_table("lists",
Field("list", "string", notnull=True),
Field("list", "string", length=255, notnull=True),
Field("definition", "text", default=""),
Field("sections", "text", comment=tp_sections, notnull=True),
Field("section_level_1", "string", default="", label=T("Level 1")),
Field("section_level_2", "string", default="", label=T("Level 2")),
Field("section_level_3", "string", default="", label=T("Level 3")),
Field("section_level_4", "string", default="", label=T("Level 4")),
Field("axis_granularity_categories", "string", default="usual", label=T("Categories")),
Field("axis_granularity_projects", "string", default="project", label=T("Projects")),
Field("axis_granularity_teams", "string", default="team", label=T("Teams")),
Field("axis_granularity_time", "string", default="year", label=T("Time")),
Field("axis_direction_categories", "string", default="ASC"),
Field("axis_direction_projects", "string", default="ASC"),
Field("axis_direction_teams", "string", default="ASC"),
Field("axis_direction_time", "string", default="ASC"),
Field("section_level_1", "string", length=255, default="", label=T("Level 1")),
Field("section_level_2", "string", length=255, default="", label=T("Level 2")),
Field("section_level_3", "string", length=255, default="", label=T("Level 3")),
Field("section_level_4", "string", length=255, default="", label=T("Level 4")),
Field("axis_granularity_categories", "string", length=255, default="usual", label=T("Categories")),
Field("axis_granularity_projects", "string", length=255, default="project", label=T("Projects")),
Field("axis_granularity_teams", "string", length=255, default="team", label=T("Teams")),
Field("axis_granularity_time", "string", length=255, default="year", label=T("Time")),
Field("axis_direction_categories", "string", length=255, default="ASC"),
Field("axis_direction_projects", "string", length=255, default="ASC"),
Field("axis_direction_teams", "string", length=255, default="ASC"),
Field("axis_direction_time", "string", length=255, default="ASC"),
Field("axis_label_converters", "text", comment=tp_axis_label, default="", label="Converters"),
Field("header_flag", "boolean", default=True, label="Header"),
Field("footer_flag", "boolean", default=True, label="Footer"),
......
......@@ -12,20 +12,20 @@ T("can be applied on any field of the table using the SQL WHERE syntax. "
"Be aware that foreign key are not resolved (see smart_query in the web2py)")
db.define_table("metrics",
Field("metric", "string", notnull=True),
Field("metric", "string", length=255, notnull=True),
Field("definition", "text", default=""),
Field("axis_columns", "string", label=T('Columns'), notnull=True),
Field("axis_rows", "string", label=T('Rows'), notnull=True),
Field("axis_granularity_categories", "string", default="usual", label=T("Categories")),
Field("axis_granularity_projects", "string", default="project", label=T("Projects")),
Field("axis_granularity_publishers", "string", default="publisher", label=T("Publishers")),
Field("axis_granularity_teams", "string", default="team", label=T("Teams")),
Field("axis_granularity_time", "string", default="year", label=T("Time")),
Field("axis_direction_categories", "string", default="ASC"),
Field("axis_direction_projects", "string", default="ASC"),
Field("axis_direction_publishers", "string", default="ASC"),
Field("axis_direction_teams", "string", default="ASC"),
Field("axis_direction_time", "string", default="ASC"),
Field("axis_columns", "string", length=255, label=T('Columns'), notnull=True),
Field("axis_rows", "string", length=255, label=T('Rows'), notnull=True),
Field("axis_granularity_categories", "string", length=255, default="usual", label=T("Categories")),
Field("axis_granularity_projects", "string", length=255, default="project", label=T("Projects")),
Field("axis_granularity_publishers", "string", length=255, default="publisher", label=T("Publishers")),
Field("axis_granularity_teams", "string", length=255, default="team", label=T("Teams")),
Field("axis_granularity_time", "string", length=255, default="year", label=T("Time")),
Field("axis_direction_categories", "string", length=255, default="ASC"),
Field("axis_direction_projects", "string", length=255, default="ASC"),
Field("axis_direction_publishers", "string", length=255, default="ASC"),
Field("axis_direction_teams", "string", length=255, default="ASC"),
Field("axis_direction_time", "string", length=255, default="ASC"),
Field("axis_label_converters", "text", comment=tp_axis_label, default="", label="Converters"),
Field("conditions", "text", comment=tp_conditions, default=""),
Field("header_flag", "boolean", default=True, label="Header"),
......
......@@ -58,30 +58,30 @@ T("Year of the publication")
db.define_table("publications",
Field("title", "text", comment=tp_title, notnull=True),
Field("first_author", "string", comment=tp_first_author, notnull=True),
Field("first_author", "string", length=255, comment=tp_first_author, notnull=True),
Field("authors", "text", comment=tp_authors, notnull=True),
Field("id_collaborations", "reference collaborations", default=undef_id, label="Collaboration"),
Field("id_publishers", "reference publishers", default=undef_id, label="Revue"),
Field("year", "integer", comment=tp_year, notnull=True),
Field("volume", "string", comment=tp_volume, default=""),
Field("pages", "string", comment=tp_pages, default=""),
Field("submitted", "string", comment=tp_submitted, notnull=True),
Field("preprint", "string", comment=tp_preprint, default=""),
Field("publication_url", "string", comment=tp_url, default="", label="url"),
Field("volume", "string", length=255, comment=tp_volume, default=""),
Field("pages", "string", length=255, comment=tp_pages, default=""),
Field("submitted", "string", length=255, comment=tp_submitted, notnull=True),
Field("preprint", "string", length=255, comment=tp_preprint, default=""),
Field("publication_url", "string", length=255, comment=tp_url, default="", label="url"),
Field("conference_title", "text", comment=tp_conference_title, default="", label='Title'),
Field("conference_url", "string", comment=tp_conference_url, default="", label='url'),
Field("conference_dates", "string", comment=tp_conference_dates, default="", label='Dates'),
Field("conference_town", "string", default="", label='Town'),
Field("conference_url", "string", length=255, comment=tp_conference_url, default="", label='url'),
Field("conference_dates", "string", length=255, comment=tp_conference_dates, default="", label='Dates'),
Field("conference_town", "string", length=255, default="", label='Town'),
Field("id_countries", "reference countries", default=undef_id, label='Country'),
Field("conference_speaker", "string", comment=tp_speaker, default="", label='Speaker'),
Field("report_numbers", "string", comment=tp_report_numbers, default="", label="Number(s)"),
Field("conference_speaker", "string", length=255, comment=tp_speaker, default="", label='Speaker'),
Field("report_numbers", "string", length=255, comment=tp_report_numbers, default="", label="Number(s)"),
Field("id_reports", "reference reports", default=undef_id, label="Type"),
Field("universities", "string", comment=tp_universities, default=""),
Field("directors", "string", comment=tp_directors, default=""),
Field("defense", "string", comment=tp_defense, default=""),
Field("book_isbn", "string", label="ISBN", default=""),
Field("book_issn", "string", label="ISSN", default=""),
Field("book_chapters", "string", default="", label="Chapter(s)"),
Field("universities", "string", length=255, comment=tp_universities, default=""),
Field("directors", "string", length=255, comment=tp_directors, default=""),
Field("defense", "string", length=255, comment=tp_defense, default=""),
Field("book_isbn", "string", length=255, label="ISBN", default=""),
Field("book_issn", "string", length=255, label="ISSN", default=""),
Field("book_chapters", "string", length=255, default="", label="Chapter(s)"),
Field("authors_cppm", "text", comment=tp_authors_cppm, notnull=True, label="Authors"),
Field("id_authors_roles", "reference authors_roles", default=undef_id, label="Role"),
Field("id_teams", "reference teams", label='Team', notnull=True),
......
......@@ -22,12 +22,12 @@ T("Sort the publications list associated to the section according to the "
"The publications of this section will be sort according to this field")
db.define_table("sections",
Field("section", "string", comment=tp_section, notnull=True),
Field("section", "string", length=255, comment=tp_section, notnull=True),
Field("id_renderers", "reference renderers", notnull=True, label='Render'),
Field("category_codes", "text", comment=tp_categories, default=""),
Field("conditions", "text", comment=tp_conditions, default=""),
Field("sort_field", "string", comment=tp_sort_field, default=""),
Field("direction", "string", default='ASC', requires=IS_IN_SET(DIRS)),
Field("sort_field", "string", length=255, comment=tp_sort_field, default=""),
Field("direction", "string", length=255, default='ASC', requires=IS_IN_SET(DIRS)),
Field("definition", "text", default=""),
migrate="sections.table")
......
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