From 2d4f0cd2bb0b768f401ca776eb256d7f31957976 Mon Sep 17 00:00:00 2001 From: Fabrice Bellingard Date: Tue, 27 Mar 2012 09:36:25 +0200 Subject: [PATCH] Improve DB readme file. --- sonar-server/src/main/webapp/WEB-INF/db/migrate/README.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/README.txt b/sonar-server/src/main/webapp/WEB-INF/db/migrate/README.txt index f1d93735e13..906efdf97d2 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/README.txt +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/README.txt @@ -12,7 +12,11 @@ HOW TO ADD A MIGRATION RECOMMENDATIONS -* Prefer to add nullable columns to avoid problems during migration. +* Prefer to add nullable columns to avoid problems during migration, EXCEPT for booleans. For booleans: + + * columns must be NON-nullable but default value (false) must NOT be set in database. It allows to fully define the model programmatically. + * column names must be chosen so that the default value is actually false. + * E.g.: rule_failures.switched_off * Always create an index with a name : add_index "action_plans", "project_id", :name => "action_plans_project_id" Note that this name is limited to 30 characters because of Oracle constraint. -- 2.39.5