From 59e3802c7476591cfa1d50c2008ecf9e67e75828 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 19 Mar 2007 18:12:35 +0000 Subject: [PATCH] fixed migration scripts to work with mysql 5 running in strict mode git-svn-id: http://redmine.rubyforge.org/svn/trunk@349 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- db/migrate/001_setup.rb | 12 ++++++------ db/migrate/010_create_comments.rb | 2 +- db/migrate/029_create_wiki_contents.rb | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/db/migrate/001_setup.rb b/db/migrate/001_setup.rb index ee22c148b..3a30380f7 100644 --- a/db/migrate/001_setup.rb +++ b/db/migrate/001_setup.rb @@ -49,7 +49,7 @@ class Setup < ActiveRecord::Migration t.column "type", :string, :limit => 30, :default => "", :null => false t.column "name", :string, :limit => 30, :default => "", :null => false t.column "field_format", :string, :limit => 30, :default => "", :null => false - t.column "possible_values", :text, :default => "" + t.column "possible_values", :text t.column "regexp", :string, :default => "" t.column "min_length", :integer, :default => 0, :null => false t.column "max_length", :integer, :default => 0, :null => false @@ -71,14 +71,14 @@ class Setup < ActiveRecord::Migration t.column "customized_type", :string, :limit => 30, :default => "", :null => false t.column "customized_id", :integer, :default => 0, :null => false t.column "custom_field_id", :integer, :default => 0, :null => false - t.column "value", :text, :default => "", :null => false + t.column "value", :text end create_table "documents", :force => true do |t| t.column "project_id", :integer, :default => 0, :null => false t.column "category_id", :integer, :default => 0, :null => false t.column "title", :string, :limit => 60, :default => "", :null => false - t.column "description", :text, :default => "" + t.column "description", :text t.column "created_on", :timestamp end @@ -100,7 +100,7 @@ class Setup < ActiveRecord::Migration t.column "issue_id", :integer, :default => 0, :null => false t.column "status_id", :integer, :default => 0, :null => false t.column "author_id", :integer, :default => 0, :null => false - t.column "notes", :text, :default => "" + t.column "notes", :text t.column "created_on", :timestamp end @@ -117,7 +117,7 @@ class Setup < ActiveRecord::Migration t.column "tracker_id", :integer, :default => 0, :null => false t.column "project_id", :integer, :default => 0, :null => false t.column "subject", :string, :default => "", :null => false - t.column "description", :text, :default => "", :null => false + t.column "description", :text t.column "due_date", :date t.column "category_id", :integer t.column "status_id", :integer, :default => 0, :null => false @@ -143,7 +143,7 @@ class Setup < ActiveRecord::Migration t.column "project_id", :integer t.column "title", :string, :limit => 60, :default => "", :null => false t.column "summary", :string, :limit => 255, :default => "" - t.column "description", :text, :default => "", :null => false + t.column "description", :text t.column "author_id", :integer, :default => 0, :null => false t.column "created_on", :timestamp end diff --git a/db/migrate/010_create_comments.rb b/db/migrate/010_create_comments.rb index 322a019bc..d804140b0 100644 --- a/db/migrate/010_create_comments.rb +++ b/db/migrate/010_create_comments.rb @@ -4,7 +4,7 @@ class CreateComments < ActiveRecord::Migration t.column :commented_type, :string, :limit => 30, :default => "", :null => false t.column :commented_id, :integer, :default => 0, :null => false t.column :author_id, :integer, :default => 0, :null => false - t.column :comment, :text, :default => "", :null => false + t.column :comment, :text t.column :created_on, :datetime, :null => false t.column :updated_on, :datetime, :null => false end diff --git a/db/migrate/029_create_wiki_contents.rb b/db/migrate/029_create_wiki_contents.rb index 5c25c5e1a..fde2d22d0 100644 --- a/db/migrate/029_create_wiki_contents.rb +++ b/db/migrate/029_create_wiki_contents.rb @@ -3,7 +3,7 @@ class CreateWikiContents < ActiveRecord::Migration create_table :wiki_contents do |t| t.column :page_id, :integer, :null => false t.column :author_id, :integer - t.column :text, :text, :default => "", :null => false + t.column :text, :text t.column :comment, :string, :limit => 255, :default => "" t.column :updated_on, :datetime, :null => false t.column :version, :integer, :null => false