From 4b6ed33158bb4cb052c8d9128f2ede1b52836fd4 Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Sun, 11 Mar 2012 14:44:01 +0100 Subject: [PATCH] Description field for Asciicast --- app/models/asciicast.rb | 1 - db/migrate/20120311134312_add_description_to_asciicast.rb | 6 ++++++ db/schema.rb | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20120311134312_add_description_to_asciicast.rb diff --git a/app/models/asciicast.rb b/app/models/asciicast.rb index 0bcfe8b..841b839 100644 --- a/app/models/asciicast.rb +++ b/app/models/asciicast.rb @@ -12,7 +12,6 @@ class Asciicast < ActiveRecord::Base before_create :assign_user, :unless => :user - attr_reader :description attr_accessible :meta, :stdout, :stdout_timing, :stdin, :stdin_timing def self.assign_user(user_token, user) diff --git a/db/migrate/20120311134312_add_description_to_asciicast.rb b/db/migrate/20120311134312_add_description_to_asciicast.rb new file mode 100644 index 0000000..1dcf191 --- /dev/null +++ b/db/migrate/20120311134312_add_description_to_asciicast.rb @@ -0,0 +1,6 @@ +class AddDescriptionToAsciicast < ActiveRecord::Migration + def change + add_column :asciicasts, :description, :text + + end +end diff --git a/db/schema.rb b/db/schema.rb index ae11e71..a598a3f 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20120304162005) do +ActiveRecord::Schema.define(:version => 20120311134312) do create_table "asciicasts", :force => true do |t| t.integer "user_id" @@ -31,6 +31,7 @@ ActiveRecord::Schema.define(:version => 20120304162005) do t.string "stdout" t.string "stdout_timing" t.string "user_token" + t.text "description" end add_index "asciicasts", ["created_at"], :name => "index_asciicasts_on_created_at"