create new tag
view all tags


Users Documentation

Installation & Update


Web Services

I18n Documentation

Developers Documentation

Code Conventions

Database Conventions

  • Always use lower-case for tables and columns names. E.g. worker
  • Use underscore to separate words on tables and columns names. E.g. virtual_worker
  • Add suffix _table when table name is a reserved word. E.g. order_table
  • Use prefix idx_ for indexes. E.g. idx_label_on_label_type
  • Use suffix _pkey for primary keys: E.g. stretch_template_pkey
  • Use suffix _fkey for foreign keys: E.g. stretch_template_stretches_function_template_id_fkey

Commit Messages Format

  • Standard commit messages:
    Title (one line)
    Optional description (several lines)
  • If it fixes a bug:
    Bug #bug_number_at_bugtracker: Title (one line)
    Optional description (several lines)
  • You can also add tags in some situations, e.g.:
    doc: Title (one line)
    Optional description (several lines)

License Header

  • Add the next header at the beginning of each file filling the year and copyright holder:
 * This file is part of LibrePlan
 * Copyright (C) YEAR Copyright Holder (OOPS!)
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * GNU Affero General Public License for more details.
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.

Database Changes

We are using LiquiBase as tool to manage database migration and it is integrated with Maven so you just need to run mvn clean install in order to automatically apply migrations on database.

These database changelog files are under libreplan-business/src/main/resources/ directory.

During the development if you need to modify the database you should add a change set to the database chagelog file corresponding to current version (before version 1.0 we will use the file db.changelog-initial.xml, a new file will be created for each version). Check all the possible database refactorings in the manual: http://www.liquibase.org/manual/home#available_database_refactorings

Some examples of common tasks to be added in database changelog:

  • Rename table:
<changeSet id="rename-table-worker-to-employee" author="mrego">
    <comment>Rename table</comment>
    <renameTable oldTableName="worker" newTableName="employee" />
  • Rename column:
<changeSet id="rename-column-nif-to-identify_number" author="mrego">
    <comment>Rename column</comment>
    <renameColumn tableName="worker" oldColumnName="nif"
  • Add a column with a default value:
<changeSet id="add-has_children-column-with-default-value-false" author="mrego">
    <comment>Add new column with default value</comment>
    <addColumn tableName="worker">
        <column name="has_children" type="BOOLEAN" />
    <update tableName="worker">
        <column name="has_children" valueBoolean="TRUE" />

ALERT! Warning: id must be unique for each author in the same file but can not exceed 60 characters. If you have collisions you can add -1, -2, ... at the end.

HELP Note: Please add a comment explaining why you are modifying the database. You can add all the changes related with a commit in the same change set.


LibrePlan in Eclipse

Reports (JasperReports)

Use Case Development

Hibernate Second Level Cache


In file libreplan-business/src/main/resources/libreplan-business-hibernate.cfg.xml change value of property hibernate.cache.use_second_level_cache to true.


In order to see in the screen the output log of access, successes and failures of cache, it's needed to add following lines to file src/main/jetty/log4j.properties:

# Enable to log cache activity

Performance Tunning

Git Version Control System

Edit | Attach | Watch | Print version | History: r25 < r24 < r23 < r22 < r21 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r25 - 15 Jan 2013 - ltilve
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback