To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / .svn / pristine / a7 / a78ac8bdb88f10572a9f376091622a0490f579ff.svn-base @ 1297:0a574315af3e
History | View | Annotate | Download (515 Bytes)
| 1 |
class ChangeWikiContentsTextLimit < ActiveRecord::Migration |
|---|---|
| 2 |
def self.up |
| 3 |
# Migrates MySQL databases only |
| 4 |
# Postgres would raise an error (see http://dev.rubyonrails.org/ticket/3818) |
| 5 |
# Not fixed in Rails 2.3.5 |
| 6 |
if ActiveRecord::Base.connection.adapter_name =~ /mysql/i |
| 7 |
max_size = 16.megabytes |
| 8 |
change_column :wiki_contents, :text, :text, :limit => max_size |
| 9 |
change_column :wiki_content_versions, :data, :binary, :limit => max_size |
| 10 |
end |
| 11 |
end |
| 12 |
|
| 13 |
def self.down |
| 14 |
# no-op |
| 15 |
end |
| 16 |
end |