journalduhacker/db/migrate/20140804005415_add_weblogs.rb
joshua stein 85cb7c2057 first stab at planet rss aggregation
could probably use a prettier layout and auto-posting a weblog url
to the main site (carrying tags)
2014-08-03 22:07:57 -05:00

22 lines
639 B
Ruby

class AddWeblogs < ActiveRecord::Migration
def change
create_table :weblogs do |t|
t.timestamps
t.integer :user_id
t.string :title, :limit => 512
t.string :url, :limit => 512
t.string :site_title, :limit => 512
t.string :site_url, :limit => 512
t.text :content, :limit => 16777215 # mediumtext
t.text :tags
t.string :uuid
end
# why can't the charset be specified in the create_table?
execute("ALTER TABLE weblogs MODIFY `uuid` varchar(200) CHARACTER SET utf8")
add_index "weblogs", ["user_id", "uuid"], :name => "user_and_uuid",
:unique => true
end
end