2005-12-30 08:24:51 +01:00
|
|
|
class Beta1Schema < ActiveRecord::Migration
|
|
|
|
def self.up
|
|
|
|
create_table "pages", :force => true do |t|
|
|
|
|
t.column "created_at", :datetime, :null => false
|
|
|
|
t.column "updated_at", :datetime, :null => false
|
|
|
|
t.column "web_id", :integer, :default => 0, :null => false
|
|
|
|
t.column "locked_by", :string, :limit => 60
|
|
|
|
t.column "name", :string, :limit => 60
|
|
|
|
t.column "locked_at", :datetime
|
|
|
|
end
|
|
|
|
|
|
|
|
create_table "revisions", :force => true do |t|
|
|
|
|
t.column "created_at", :datetime, :null => false
|
|
|
|
t.column "updated_at", :datetime, :null => false
|
|
|
|
t.column "revised_at", :datetime, :null => false
|
|
|
|
t.column "page_id", :integer, :default => 0, :null => false
|
2007-04-08 21:37:47 +02:00
|
|
|
t.column "content", :text
|
2005-12-30 08:24:51 +01:00
|
|
|
t.column "author", :string, :limit => 60
|
|
|
|
t.column "ip", :string, :limit => 60
|
|
|
|
end
|
|
|
|
|
|
|
|
create_table "system", :force => true do |t|
|
|
|
|
t.column "password", :string, :limit => 60
|
|
|
|
end
|
|
|
|
|
|
|
|
create_table "webs", :force => true do |t|
|
|
|
|
t.column "created_at", :datetime, :null => false
|
|
|
|
t.column "updated_at", :datetime, :null => false
|
|
|
|
t.column "name", :string, :limit => 60, :default => "", :null => false
|
|
|
|
t.column "address", :string, :limit => 60, :default => "", :null => false
|
|
|
|
t.column "password", :string, :limit => 60
|
|
|
|
t.column "additional_style", :string
|
2006-05-04 08:18:33 +02:00
|
|
|
t.column "allow_uploads", :integer, :default => 1
|
|
|
|
t.column "published", :integer, :default => 0
|
|
|
|
t.column "count_pages", :integer, :default => 0
|
2005-12-30 08:24:51 +01:00
|
|
|
t.column "markup", :string, :limit => 50, :default => "textile"
|
|
|
|
t.column "color", :string, :limit => 6, :default => "008B26"
|
|
|
|
t.column "max_upload_size", :integer, :default => 100
|
2006-05-04 08:18:33 +02:00
|
|
|
t.column "safe_mode", :integer, :default => 0
|
|
|
|
t.column "brackets_only", :integer, :default => 0
|
2005-12-30 08:24:51 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
create_table "wiki_references", :force => true do |t|
|
|
|
|
t.column "created_at", :datetime, :null => false
|
|
|
|
t.column "updated_at", :datetime, :null => false
|
|
|
|
t.column "page_id", :integer, :default => 0, :null => false
|
|
|
|
t.column "referenced_name", :string, :limit => 60, :default => "", :null => false
|
|
|
|
t.column "link_type", :string, :limit => 1, :default => "", :null => false
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.down
|
|
|
|
raise 'Initial schema - cannot be further reverted'
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|