Length of wiki_references referenced_name

Another minor database migration. The length of the
'referenced_name' field in the previous schema was
limited to 60 characters. Increase that to 255
characters (matching the length of then 'name' field
in 'pages', etc).

This has no effect in SQLite3 users (the default), since
SQLite3 does not enforce these length restrictions. But
MySQL users need this.

As always, run

   rake upgrade_instiki

to seamlessly upgrade your database to the latest schema.
This commit is contained in:
Jacques Distler 2010-01-01 16:57:21 -06:00
parent 753520eb70
commit 4bb22e0fa8
3 changed files with 28 additions and 19 deletions

View file

@ -0,0 +1,9 @@
class ModifyReferencedNameType < ActiveRecord::Migration
def self.up
change_column :wiki_references, :referenced_name, :string, :limit => 255
end
def self.down
raise ActiveRecord::IrreversibleMigration
end
end

Binary file not shown.

View file

@ -9,7 +9,7 @@
# #
# It's strongly recommended to check this file into your version control system. # It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20091021024908) do ActiveRecord::Schema.define(:version => 20100101192755) do
create_table "pages", :force => true do |t| create_table "pages", :force => true do |t|
t.datetime "created_at", :null => false t.datetime "created_at", :null => false
@ -21,11 +21,11 @@ ActiveRecord::Schema.define(:version => 20091021024908) do
end end
create_table "revisions", :force => true do |t| create_table "revisions", :force => true do |t|
t.datetime "created_at", :null => false t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
t.datetime "revised_at", :null => false t.datetime "revised_at", :null => false
t.integer "page_id", :default => 0, :null => false t.integer "page_id", :default => 0, :null => false
t.text "content", :limit => 16777215 t.text "content", :limit => 16777215, :default => "", :null => false
t.string "author", :limit => 60 t.string "author", :limit => 60
t.string "ip", :limit => 60 t.string "ip", :limit => 60
end end
@ -47,20 +47,20 @@ ActiveRecord::Schema.define(:version => 20091021024908) do
end end
create_table "webs", :force => true do |t| create_table "webs", :force => true do |t|
t.datetime "created_at", :null => false t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
t.string "name", :limit => 60, :default => "", :null => false t.string "name", :limit => 60, :default => "", :null => false
t.string "address", :limit => 60, :default => "", :null => false t.string "address", :limit => 60, :default => "", :null => false
t.string "password", :limit => 60 t.string "password", :limit => 60
t.text "additional_style" t.text "additional_style", :limit => 255
t.integer "allow_uploads", :default => 1 t.integer "allow_uploads", :default => 1
t.integer "published", :default => 0 t.integer "published", :default => 0
t.integer "count_pages", :default => 0 t.integer "count_pages", :default => 0
t.string "markup", :limit => 50, :default => "markdownMML" t.string "markup", :limit => 50, :default => "markdownMML"
t.string "color", :limit => 6, :default => "008B26" t.string "color", :limit => 6, :default => "008B26"
t.integer "max_upload_size", :default => 100 t.integer "max_upload_size", :default => 100
t.integer "safe_mode", :default => 0 t.integer "safe_mode", :default => 0
t.integer "brackets_only", :default => 0 t.integer "brackets_only", :default => 0
end end
create_table "wiki_files", :force => true do |t| create_table "wiki_files", :force => true do |t|