From 4bb22e0fa80a65bf8db0ca019e9e6fdf9377a1d9 Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Fri, 1 Jan 2010 16:57:21 -0600 Subject: [PATCH] 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. --- ...00101192755_modify_referenced_name_type.rb | 9 +++++ db/production.db.sqlite3 | Bin 21504 -> 21504 bytes db/schema.rb | 38 +++++++++--------- 3 files changed, 28 insertions(+), 19 deletions(-) create mode 100644 db/migrate/20100101192755_modify_referenced_name_type.rb diff --git a/db/migrate/20100101192755_modify_referenced_name_type.rb b/db/migrate/20100101192755_modify_referenced_name_type.rb new file mode 100644 index 00000000..eeb033a7 --- /dev/null +++ b/db/migrate/20100101192755_modify_referenced_name_type.rb @@ -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 diff --git a/db/production.db.sqlite3 b/db/production.db.sqlite3 index 4018a127a84e772cb8d1f9c097f75192feffb090..7b3b750e187dfaebabbb39176e728d4040775625 100644 GIT binary patch delta 486 zcmZoz!Pu~Zae}m<1OqCN+o*GrnN1uh$RV=%H#55k-(&_B1{nqh8OCEwtxW$W3rIAx zFfcG0Z=NoZ%PhdgP{II2&lwAub~1A_H%@F!*t}cTm1(oBraR*%4i*kBW(G$FAlkyX zcQT)bF=wGDySTkPW24|?J}rsOOSPgIH}7?IX4_=IBErSY*v7!5%UsCVHkr>Qo2$uD zf?Zr&o3X`m@>~f+ex>rv?9BM0)U?#1)V$=>$sgp(Cb!9}P0o~*lrS~%+MRJqh%dk)0A>*uz&BB7j^wjvw6eUeAP)8q V11j9dEG)#V$%v|uW%9#dc>snMfnfju delta 380 zcmZoz!Pu~Zae}m+Ng7qnN18R$RW7-H#55k9|Hp`gA4-@O=djC)H+!}qM4=1 zfQ^0gbctMMK30ZK28K>XF~;3YdQ3YeHfD>p__DH#i;6OK)RrVRa`Cc@`)V^bYEGWu zDmQtiyO(NtW_D(LQEFOhQEFatYO#WbQbA&RYJ6sjl4he4AG>%gP_-veb%ipfO1QR^ z_`Jm2R3**LB{Hr|n>biFxL6r&85nID``O$hen*aWBMlm+Z-JWDc+Z1BhkvPPvB7do`WeCTXy8GCyHp{>}W2`N?KQmTSzD gpZF_qF*848VE)4Vi}@i?>@xG@bHQwrp9f0<0Mt}$mjD0& diff --git a/db/schema.rb b/db/schema.rb index 4342bdfd..07b7e97f 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -9,7 +9,7 @@ # # 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| t.datetime "created_at", :null => false @@ -21,11 +21,11 @@ ActiveRecord::Schema.define(:version => 20091021024908) do end create_table "revisions", :force => true do |t| - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.datetime "revised_at", :null => false - t.integer "page_id", :default => 0, :null => false - t.text "content", :limit => 16777215 + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.datetime "revised_at", :null => false + t.integer "page_id", :default => 0, :null => false + t.text "content", :limit => 16777215, :default => "", :null => false t.string "author", :limit => 60 t.string "ip", :limit => 60 end @@ -47,20 +47,20 @@ ActiveRecord::Schema.define(:version => 20091021024908) do end create_table "webs", :force => true do |t| - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.string "name", :limit => 60, :default => "", :null => false - t.string "address", :limit => 60, :default => "", :null => false + t.datetime "created_at", :null => false + t.datetime "updated_at", :null => false + t.string "name", :limit => 60, :default => "", :null => false + t.string "address", :limit => 60, :default => "", :null => false t.string "password", :limit => 60 - t.text "additional_style" - t.integer "allow_uploads", :default => 1 - t.integer "published", :default => 0 - t.integer "count_pages", :default => 0 - t.string "markup", :limit => 50, :default => "markdownMML" - t.string "color", :limit => 6, :default => "008B26" - t.integer "max_upload_size", :default => 100 - t.integer "safe_mode", :default => 0 - t.integer "brackets_only", :default => 0 + t.text "additional_style", :limit => 255 + t.integer "allow_uploads", :default => 1 + t.integer "published", :default => 0 + t.integer "count_pages", :default => 0 + t.string "markup", :limit => 50, :default => "markdownMML" + t.string "color", :limit => 6, :default => "008B26" + t.integer "max_upload_size", :default => 100 + t.integer "safe_mode", :default => 0 + t.integer "brackets_only", :default => 0 end create_table "wiki_files", :force => true do |t|