update with changes from Production branch
This commit is contained in:
29
db/migrate/20101111054358_create_users.rb
Normal file
29
db/migrate/20101111054358_create_users.rb
Normal file
@ -0,0 +1,29 @@
|
||||
class CreateUsers < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :users do |t|
|
||||
|
||||
t.string :login, :null => false # optional, you can use email instead, or both
|
||||
t.string :email, :null => false # optional, you can use login instead, or both
|
||||
t.string :crypted_password, :null => false # optional, see below
|
||||
t.string :password_salt, :null => false # optional, but highly recommended
|
||||
t.string :persistence_token, :null => false # required
|
||||
#t.string :single_access_token, :null => false # optional, see Authlogic::Session::Params
|
||||
t.string :perishable_token, :null => false # optional, see Authlogic::Session::Perishability
|
||||
|
||||
# Magic columns, just like ActiveRecord's created_at and updated_at. These are automatically maintained by Authlogic if they are present.
|
||||
#t.integer :login_count, :null => false, :default => 0 # optional, see Authlogic::Session::MagicColumns
|
||||
#t.integer :failed_login_count, :null => false, :default => 0 # optional, see Authlogic::Session::MagicColumns
|
||||
#t.datetime :last_request_at # optional, see Authlogic::Session::MagicColumns
|
||||
t.datetime :current_login_at # optional, see Authlogic::Session::MagicColumns
|
||||
t.datetime :last_login_at # optional, see Authlogic::Session::MagicColumns
|
||||
t.string :current_login_ip # optional, see Authlogic::Session::MagicColumns
|
||||
t.string :last_login_ip
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :users
|
||||
end
|
||||
end
|
18
db/migrate/20101116224140_create_api_keys.rb
Normal file
18
db/migrate/20101116224140_create_api_keys.rb
Normal file
@ -0,0 +1,18 @@
|
||||
class CreateApiKeys < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :api_keys do |t|
|
||||
t.string :api_key, :limit => 16
|
||||
t.integer :device_id
|
||||
t.integer :feed_id
|
||||
t.integer :user_id
|
||||
t.boolean :write_flag, :default => 0
|
||||
t.boolean :public_flag, :default => 0
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :api_keys
|
||||
end
|
||||
end
|
11
db/migrate/20101116225014_add_indexes_to_api_key.rb
Normal file
11
db/migrate/20101116225014_add_indexes_to_api_key.rb
Normal file
@ -0,0 +1,11 @@
|
||||
class AddIndexesToApiKey < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_index :api_keys, :api_key, :unique => true
|
||||
add_index :api_keys, :device_id
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_index :api_keys, :device_id
|
||||
remove_index :api_keys, :api_key
|
||||
end
|
||||
end
|
9
db/migrate/20101117005031_remove_feed_id_from_api_key.rb
Normal file
9
db/migrate/20101117005031_remove_feed_id_from_api_key.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class RemoveFeedIdFromApiKey < ActiveRecord::Migration
|
||||
def self.up
|
||||
remove_column :api_keys, :feed_id
|
||||
end
|
||||
|
||||
def self.down
|
||||
add_column :api_keys, :feed_id, :integer
|
||||
end
|
||||
end
|
22
db/migrate/20101117211040_create_feeds.rb
Normal file
22
db/migrate/20101117211040_create_feeds.rb
Normal file
@ -0,0 +1,22 @@
|
||||
class CreateFeeds < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :feeds do |t|
|
||||
t.integer :device_id
|
||||
t.text :raw_data
|
||||
t.text :data1
|
||||
t.text :data2
|
||||
t.text :data3
|
||||
t.text :data4
|
||||
t.text :data5
|
||||
t.text :data6
|
||||
t.text :data7
|
||||
t.text :data8
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :feeds
|
||||
end
|
||||
end
|
9
db/migrate/20101117211209_add_index_to_feeds.rb
Normal file
9
db/migrate/20101117211209_add_index_to_feeds.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class AddIndexToFeeds < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_index :feeds, :device_id
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_index :feeds, :device_id
|
||||
end
|
||||
end
|
9
db/migrate/20101118061100_add_time_zone_to_user.rb
Normal file
9
db/migrate/20101118061100_add_time_zone_to_user.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class AddTimeZoneToUser < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :users, :time_zone, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :users, :time_zone
|
||||
end
|
||||
end
|
9
db/migrate/20101119231040_add_entry_id_to_feeds.rb
Normal file
9
db/migrate/20101119231040_add_entry_id_to_feeds.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class AddEntryIdToFeeds < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :feeds, :entry_id, :integer
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :feeds, :entry_id
|
||||
end
|
||||
end
|
9
db/migrate/20101123073857_add_note_to_api_keys.rb
Normal file
9
db/migrate/20101123073857_add_note_to_api_keys.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class AddNoteToApiKeys < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :api_keys, :note, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :api_keys, :note
|
||||
end
|
||||
end
|
23
db/migrate/20101207175152_change_feed_data_to_fields.rb
Normal file
23
db/migrate/20101207175152_change_feed_data_to_fields.rb
Normal file
@ -0,0 +1,23 @@
|
||||
class ChangeFeedDataToFields < ActiveRecord::Migration
|
||||
def self.up
|
||||
rename_column :feeds, :data1, :field1
|
||||
rename_column :feeds, :data2, :field2
|
||||
rename_column :feeds, :data3, :field3
|
||||
rename_column :feeds, :data4, :field4
|
||||
rename_column :feeds, :data5, :field5
|
||||
rename_column :feeds, :data6, :field6
|
||||
rename_column :feeds, :data7, :field7
|
||||
rename_column :feeds, :data8, :field8
|
||||
end
|
||||
|
||||
def self.down
|
||||
rename_column :feeds, :field1, :data1
|
||||
rename_column :feeds, :field2, :data2
|
||||
rename_column :feeds, :field3, :data3
|
||||
rename_column :feeds, :field4, :data4
|
||||
rename_column :feeds, :field5, :data5
|
||||
rename_column :feeds, :field6, :data6
|
||||
rename_column :feeds, :field7, :data7
|
||||
rename_column :feeds, :field8, :data8
|
||||
end
|
||||
end
|
9
db/migrate/20101210151518_add_status_to_feeds.rb
Normal file
9
db/migrate/20101210151518_add_status_to_feeds.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class AddStatusToFeeds < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :feeds, :status, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :feeds, :status
|
||||
end
|
||||
end
|
23
db/migrate/20101217193433_add_field_options_to_channels.rb
Normal file
23
db/migrate/20101217193433_add_field_options_to_channels.rb
Normal file
@ -0,0 +1,23 @@
|
||||
class AddFieldOptionsToChannels < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :channels, :options1, :text
|
||||
add_column :channels, :options2, :text
|
||||
add_column :channels, :options3, :text
|
||||
add_column :channels, :options4, :text
|
||||
add_column :channels, :options5, :text
|
||||
add_column :channels, :options6, :text
|
||||
add_column :channels, :options7, :text
|
||||
add_column :channels, :options8, :text
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :channels, :options1
|
||||
remove_column :channels, :options2
|
||||
remove_column :channels, :options3
|
||||
remove_column :channels, :options4
|
||||
remove_column :channels, :options5
|
||||
remove_column :channels, :options6
|
||||
remove_column :channels, :options7
|
||||
remove_column :channels, :options8
|
||||
end
|
||||
end
|
15
db/migrate/20101218173400_create_tags.rb
Normal file
15
db/migrate/20101218173400_create_tags.rb
Normal file
@ -0,0 +1,15 @@
|
||||
class CreateTags < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :tags do |t|
|
||||
t.string :name
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :tags, :name
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :tags
|
||||
end
|
||||
end
|
16
db/migrate/20101218174125_create_taggings.rb
Normal file
16
db/migrate/20101218174125_create_taggings.rb
Normal file
@ -0,0 +1,16 @@
|
||||
class CreateTaggings < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :taggings do |t|
|
||||
t.integer :tag_id
|
||||
t.integer :channel_id
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
add_index :taggings, :tag_id
|
||||
add_index :taggings, :channel_id
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :taggings
|
||||
end
|
||||
end
|
13
db/migrate/20110119170853_add_geolocation_to_feed.rb
Normal file
13
db/migrate/20110119170853_add_geolocation_to_feed.rb
Normal file
@ -0,0 +1,13 @@
|
||||
class AddGeolocationToFeed < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :feeds, :latitude, :decimal, :precision => 15, :scale => 10
|
||||
add_column :feeds, :longitude, :decimal, :precision => 15, :scale => 10
|
||||
add_column :feeds, :elevation, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :feeds, :latitude
|
||||
remove_column :feeds, :longitude
|
||||
remove_column :feeds, :elevation
|
||||
end
|
||||
end
|
23
db/migrate/20110126140659_create_twitters.rb
Normal file
23
db/migrate/20110126140659_create_twitters.rb
Normal file
@ -0,0 +1,23 @@
|
||||
class CreateTwitters < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :twitters do |t|
|
||||
t.string :screen_name
|
||||
t.integer :user_id
|
||||
t.integer :twitter_id
|
||||
t.string :token
|
||||
t.string :secret
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :twitters, :user_id
|
||||
add_index :twitters, :twitter_id
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_index :twitters, :user_id
|
||||
remove_index :twitters, :twitter_id
|
||||
|
||||
drop_table :twitters
|
||||
end
|
||||
end
|
11
db/migrate/20110126144150_add_api_key_to_twitters.rb
Normal file
11
db/migrate/20110126144150_add_api_key_to_twitters.rb
Normal file
@ -0,0 +1,11 @@
|
||||
class AddApiKeyToTwitters < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :twitters, :api_key, :string, :limit => 16
|
||||
add_index :twitters, :api_key
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_index :twitters, :api_key
|
||||
remove_column :twitters, :api_key
|
||||
end
|
||||
end
|
14
db/migrate/20110217135144_create_headers.rb
Normal file
14
db/migrate/20110217135144_create_headers.rb
Normal file
@ -0,0 +1,14 @@
|
||||
class CreateHeaders < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :headers do |t|
|
||||
t.string :name
|
||||
t.string :value
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :headers
|
||||
end
|
||||
end
|
21
db/migrate/20110225042321_create_plugins.rb
Normal file
21
db/migrate/20110225042321_create_plugins.rb
Normal file
@ -0,0 +1,21 @@
|
||||
class CreatePlugins < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :plugins do |t|
|
||||
t.string :name
|
||||
t.integer :user_id
|
||||
t.text :html
|
||||
t.text :css
|
||||
t.text :js
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :plugins, :user_id
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_index :plugins, :user_id
|
||||
|
||||
drop_table :plugins
|
||||
end
|
||||
end
|
23
db/migrate/20110227025236_change_feed_fields_to_strings.rb
Normal file
23
db/migrate/20110227025236_change_feed_fields_to_strings.rb
Normal file
@ -0,0 +1,23 @@
|
||||
class ChangeFeedFieldsToStrings < ActiveRecord::Migration
|
||||
def self.up
|
||||
change_column :feeds, :field1, :string
|
||||
change_column :feeds, :field2, :string
|
||||
change_column :feeds, :field3, :string
|
||||
change_column :feeds, :field4, :string
|
||||
change_column :feeds, :field5, :string
|
||||
change_column :feeds, :field6, :string
|
||||
change_column :feeds, :field7, :string
|
||||
change_column :feeds, :field8, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
change_column :feeds, :field1, :text
|
||||
change_column :feeds, :field2, :text
|
||||
change_column :feeds, :field3, :text
|
||||
change_column :feeds, :field4, :text
|
||||
change_column :feeds, :field5, :text
|
||||
change_column :feeds, :field6, :text
|
||||
change_column :feeds, :field7, :text
|
||||
change_column :feeds, :field8, :text
|
||||
end
|
||||
end
|
@ -0,0 +1,39 @@
|
||||
class ChangeChannelFieldsToStrings < ActiveRecord::Migration
|
||||
def self.up
|
||||
change_column :channels, :field1, :string
|
||||
change_column :channels, :field2, :string
|
||||
change_column :channels, :field3, :string
|
||||
change_column :channels, :field4, :string
|
||||
change_column :channels, :field5, :string
|
||||
change_column :channels, :field6, :string
|
||||
change_column :channels, :field7, :string
|
||||
change_column :channels, :field8, :string
|
||||
change_column :channels, :options1, :string
|
||||
change_column :channels, :options2, :string
|
||||
change_column :channels, :options3, :string
|
||||
change_column :channels, :options4, :string
|
||||
change_column :channels, :options5, :string
|
||||
change_column :channels, :options6, :string
|
||||
change_column :channels, :options7, :string
|
||||
change_column :channels, :options8, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
change_column :channels, :field1, :text
|
||||
change_column :channels, :field2, :text
|
||||
change_column :channels, :field3, :text
|
||||
change_column :channels, :field4, :text
|
||||
change_column :channels, :field5, :text
|
||||
change_column :channels, :field6, :text
|
||||
change_column :channels, :field7, :text
|
||||
change_column :channels, :field8, :text
|
||||
change_column :channels, :options1, :text
|
||||
change_column :channels, :options2, :text
|
||||
change_column :channels, :options3, :text
|
||||
change_column :channels, :options4, :text
|
||||
change_column :channels, :options5, :text
|
||||
change_column :channels, :options6, :text
|
||||
change_column :channels, :options7, :text
|
||||
change_column :channels, :options8, :text
|
||||
end
|
||||
end
|
@ -0,0 +1,9 @@
|
||||
class AddCreatedAtIndexToFeeds < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_index :feeds, :created_at
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_index :feeds, :created_at
|
||||
end
|
||||
end
|
13
db/migrate/20110227221002_add_double_index_to_feeds.rb
Normal file
13
db/migrate/20110227221002_add_double_index_to_feeds.rb
Normal file
@ -0,0 +1,13 @@
|
||||
class AddDoubleIndexToFeeds < ActiveRecord::Migration
|
||||
def self.up
|
||||
remove_index :feeds, :channel_id
|
||||
remove_index :feeds, :created_at
|
||||
add_index :feeds, [:channel_id, :created_at]
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_index :feeds, [:channel_id, :created_at]
|
||||
add_index :feeds, :channel_id
|
||||
add_index :feeds, :created_at
|
||||
end
|
||||
end
|
@ -0,0 +1,9 @@
|
||||
class AddChannelIdEntryIdIndexToFeeds < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_index :feeds, [:channel_id, :entry_id]
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_index :feeds, [:channel_id, :entry_id]
|
||||
end
|
||||
end
|
19
db/migrate/20110405211741_create_pipes.rb
Normal file
19
db/migrate/20110405211741_create_pipes.rb
Normal file
@ -0,0 +1,19 @@
|
||||
class CreatePipes < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :pipes do |t|
|
||||
t.string :name, :null => false
|
||||
t.string :url, :null => false
|
||||
t.string :slug, :null => false, :unique => true
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :pipes, :slug
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_index :pipes, :slug
|
||||
|
||||
drop_table :pipes
|
||||
end
|
||||
end
|
11
db/migrate/20110406220648_add_fields_to_pipes.rb
Normal file
11
db/migrate/20110406220648_add_fields_to_pipes.rb
Normal file
@ -0,0 +1,11 @@
|
||||
class AddFieldsToPipes < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :pipes, :parse, :string
|
||||
add_column :pipes, :cache, :integer
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :pipes, :parse
|
||||
remove_column :pipes, :cache
|
||||
end
|
||||
end
|
15
db/migrate/20110407034539_add_social_to_channels.rb
Normal file
15
db/migrate/20110407034539_add_social_to_channels.rb
Normal file
@ -0,0 +1,15 @@
|
||||
class AddSocialToChannels < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :channels, :social, :boolean, :default => 0
|
||||
add_column :channels, :slug, :string
|
||||
|
||||
add_index :channels, :slug
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_index :channels, :slug
|
||||
|
||||
remove_column :channels, :slug
|
||||
remove_column :channels, :social
|
||||
end
|
||||
end
|
9
db/migrate/20110409071450_add_location_to_feeds.rb
Normal file
9
db/migrate/20110409071450_add_location_to_feeds.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class AddLocationToFeeds < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :feeds, :location, :string, :after => :elevation
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :feeds, :location
|
||||
end
|
||||
end
|
9
db/migrate/20110409221058_add_status_to_channels.rb
Normal file
9
db/migrate/20110409221058_add_status_to_channels.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class AddStatusToChannels < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :channels, :status, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :channels, :status
|
||||
end
|
||||
end
|
9
db/migrate/20110419173839_add_url_to_channel.rb
Normal file
9
db/migrate/20110419173839_add_url_to_channel.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class AddUrlToChannel < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :channels, :url, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :channels, :status
|
||||
end
|
||||
end
|
17
db/migrate/20110425145717_create_comments.rb
Normal file
17
db/migrate/20110425145717_create_comments.rb
Normal file
@ -0,0 +1,17 @@
|
||||
class CreateComments < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :comments do |t|
|
||||
t.integer :parent_id
|
||||
t.text :body
|
||||
t.integer :flags
|
||||
t.integer :user_id
|
||||
t.string :ip_address
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :comments
|
||||
end
|
||||
end
|
9
db/migrate/20110427021512_add_channel_id_to_comments.rb
Normal file
9
db/migrate/20110427021512_add_channel_id_to_comments.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class AddChannelIdToComments < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :comments, :channel_id, :integer
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :comments, :channel_id
|
||||
end
|
||||
end
|
9
db/migrate/20110427021659_add_indices_to_comments.rb
Normal file
9
db/migrate/20110427021659_add_indices_to_comments.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class AddIndicesToComments < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_index :comments, :channel_id
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_index :comments, :channel_id
|
||||
end
|
||||
end
|
18
db/migrate/20110428182848_create_watchings.rb
Normal file
18
db/migrate/20110428182848_create_watchings.rb
Normal file
@ -0,0 +1,18 @@
|
||||
class CreateWatchings < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :watchings do |t|
|
||||
t.integer :user_id
|
||||
t.integer :channel_id
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :watchings, [:user_id, :channel_id]
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_index :watchings, [:user_id, :channel_id]
|
||||
|
||||
drop_table :watchings
|
||||
end
|
||||
end
|
11
db/migrate/20110428225855_add_video_fields_to_channels.rb
Normal file
11
db/migrate/20110428225855_add_video_fields_to_channels.rb
Normal file
@ -0,0 +1,11 @@
|
||||
class AddVideoFieldsToChannels < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :channels, :video_id, :string
|
||||
add_column :channels, :video_type, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :channels, :video_id
|
||||
remove_column :channels, :video_type
|
||||
end
|
||||
end
|
13
db/migrate/20110513192617_add_fields_to_users.rb
Normal file
13
db/migrate/20110513192617_add_fields_to_users.rb
Normal file
@ -0,0 +1,13 @@
|
||||
class AddFieldsToUsers < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :users, :public_flag, :boolean, :default => false
|
||||
add_column :users, :bio, :text
|
||||
add_column :users, :website, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :users, :website
|
||||
remove_column :users, :bio
|
||||
remove_column :users, :public_flag
|
||||
end
|
||||
end
|
15
db/migrate/20110528172838_create_failedlogins.rb
Normal file
15
db/migrate/20110528172838_create_failedlogins.rb
Normal file
@ -0,0 +1,15 @@
|
||||
class CreateFailedlogins < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :failedlogins do |t|
|
||||
t.string :login
|
||||
t.string :password
|
||||
t.string :ip_address
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :failedlogins
|
||||
end
|
||||
end
|
9
db/migrate/20111209111008_rename_twitters_table.rb
Normal file
9
db/migrate/20111209111008_rename_twitters_table.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class RenameTwittersTable < ActiveRecord::Migration
|
||||
def self.up
|
||||
rename_table :twitters, :twitter_accounts
|
||||
end
|
||||
|
||||
def self.down
|
||||
rename_table :twitter_accounts, :twitters
|
||||
end
|
||||
end
|
11
db/migrate/20111220200743_add_index_to_channels.rb
Normal file
11
db/migrate/20111220200743_add_index_to_channels.rb
Normal file
@ -0,0 +1,11 @@
|
||||
class AddIndexToChannels < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_index :channels, :user_id
|
||||
add_index :channels, [:public_flag, :last_entry_id, :updated_at], :name => 'channels_public_viewable'
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_index :channels, :user_id
|
||||
remove_index :channels, :name => 'channels_public_viewable'
|
||||
end
|
||||
end
|
9
db/migrate/20111220205057_add_index_to_user_logins.rb
Normal file
9
db/migrate/20111220205057_add_index_to_user_logins.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class AddIndexToUserLogins < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_index :users, :login
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_index :users, :login
|
||||
end
|
||||
end
|
9
db/migrate/20111222205615_add_index_to_headers_table.rb
Normal file
9
db/migrate/20111222205615_add_index_to_headers_table.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class AddIndexToHeadersTable < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_index :headers, :thinghttp_id
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_index :headers, :thinghttp_id
|
||||
end
|
||||
end
|
15
db/migrate/20120209003458_create_windows.rb
Normal file
15
db/migrate/20120209003458_create_windows.rb
Normal file
@ -0,0 +1,15 @@
|
||||
class CreateWindows < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :windows do |t|
|
||||
t.integer :channel_id
|
||||
t.integer :plugin_id
|
||||
t.integer :position
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :windows
|
||||
end
|
||||
end
|
9
db/migrate/20120213011639_add_html_to_window.rb
Normal file
9
db/migrate/20120213011639_add_html_to_window.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class AddHtmlToWindow < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :windows, :html, :text
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :windows, :html
|
||||
end
|
||||
end
|
9
db/migrate/20120215111613_add_index_to_users.rb
Normal file
9
db/migrate/20120215111613_add_index_to_users.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class AddIndexToUsers < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_index :users, :email
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_index :users, :email
|
||||
end
|
||||
end
|
@ -0,0 +1,9 @@
|
||||
class AddClearingFlagToChannel < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :channels, :clearing, :boolean, :null => false, :default => false
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :channels, :clearing
|
||||
end
|
||||
end
|
11
db/migrate/20120220015055_add_col_to_windows.rb
Normal file
11
db/migrate/20120220015055_add_col_to_windows.rb
Normal file
@ -0,0 +1,11 @@
|
||||
class AddColToWindows < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :windows, :col, :integer
|
||||
add_column :windows, :title, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :windows, :title
|
||||
remove_column :windows, :col
|
||||
end
|
||||
end
|
@ -0,0 +1,9 @@
|
||||
class RemovePluginIdFromWindow < ActiveRecord::Migration
|
||||
def self.up
|
||||
remove_column :windows, :plugin_id
|
||||
end
|
||||
|
||||
def self.down
|
||||
add_column :windows, :plugin_id, :string
|
||||
end
|
||||
end
|
9
db/migrate/20120220035936_add_wtype_to_windows.rb
Normal file
9
db/migrate/20120220035936_add_wtype_to_windows.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class AddWtypeToWindows < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :windows, :wtype, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :windows, :wtype
|
||||
end
|
||||
end
|
9
db/migrate/20120227002240_add_name_to_window.rb
Normal file
9
db/migrate/20120227002240_add_name_to_window.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class AddNameToWindow < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :windows, :name, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :windows, :name
|
||||
end
|
||||
end
|
14
db/migrate/20120317011252_create_chart_window_details.rb
Normal file
14
db/migrate/20120317011252_create_chart_window_details.rb
Normal file
@ -0,0 +1,14 @@
|
||||
class CreateChartWindowDetails < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :chart_window_details do |t|
|
||||
t.integer :chart_window_id
|
||||
t.integer :field_number
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :chart_window_details
|
||||
end
|
||||
end
|
13
db/migrate/20120319001841_create_portlet_window_details.rb
Normal file
13
db/migrate/20120319001841_create_portlet_window_details.rb
Normal file
@ -0,0 +1,13 @@
|
||||
class CreatePortletWindowDetails < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :portlet_window_details do |t|
|
||||
t.integer :portlet_window_id
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :portlet_window_details
|
||||
end
|
||||
end
|
9
db/migrate/20120321013341_add_type_to_window.rb
Normal file
9
db/migrate/20120321013341_add_type_to_window.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class AddTypeToWindow < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :windows, :type, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :windows, :type
|
||||
end
|
||||
end
|
@ -0,0 +1,9 @@
|
||||
class AddOptionsToChartWindowDetails < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :chart_window_details, :options, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :chart_window_details, :options
|
||||
end
|
||||
end
|
9
db/migrate/20120331221037_add_private_flag_to_windows.rb
Normal file
9
db/migrate/20120331221037_add_private_flag_to_windows.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class AddPrivateFlagToWindows < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :windows, :private_flag, :boolean, :default => false
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :windows, :private_flag
|
||||
end
|
||||
end
|
9
db/migrate/20120521003815_add_show_flag_to_windows.rb
Normal file
9
db/migrate/20120521003815_add_show_flag_to_windows.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class AddShowFlagToWindows < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :windows, :show_flag, :boolean, :default => true
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :windows, :show_flag
|
||||
end
|
||||
end
|
9
db/migrate/20120709152043_add_private_flag_to_plugins.rb
Normal file
9
db/migrate/20120709152043_add_private_flag_to_plugins.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class AddPrivateFlagToPlugins < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :plugins, :private_flag, :boolean, :default => true
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :plugins, :private_flag
|
||||
end
|
||||
end
|
14
db/migrate/20120716160028_create_plugin_window_details.rb
Normal file
14
db/migrate/20120716160028_create_plugin_window_details.rb
Normal file
@ -0,0 +1,14 @@
|
||||
class CreatePluginWindowDetails < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :plugin_window_details do |t|
|
||||
t.integer :plugin_id
|
||||
t.integer :plugin_window_id
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :plugin_window_details
|
||||
end
|
||||
end
|
9
db/migrate/20120821145951_add_ranking_to_channel.rb
Normal file
9
db/migrate/20120821145951_add_ranking_to_channel.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class AddRankingToChannel < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :channels, :ranking, :integer
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :channels, :ranking
|
||||
end
|
||||
end
|
8
db/migrate/20120907024520_add_index_to_channel.rb
Normal file
8
db/migrate/20120907024520_add_index_to_channel.rb
Normal file
@ -0,0 +1,8 @@
|
||||
class AddIndexToChannel < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_index(:channels, :ranking)
|
||||
end
|
||||
|
||||
def self.down
|
||||
end
|
||||
end
|
6
db/migrate/20130618221922_change_api_key.rb
Normal file
6
db/migrate/20130618221922_change_api_key.rb
Normal file
@ -0,0 +1,6 @@
|
||||
class ChangeApiKey < ActiveRecord::Migration
|
||||
def change
|
||||
change_column :twitter_accounts, :api_key, :string
|
||||
end
|
||||
|
||||
end
|
6
db/migrate/20130621124211_change_api_key_limit.rb
Normal file
6
db/migrate/20130621124211_change_api_key_limit.rb
Normal file
@ -0,0 +1,6 @@
|
||||
class ChangeApiKeyLimit < ActiveRecord::Migration
|
||||
def change
|
||||
change_column :twitter_accounts, :api_key, :string, :limit => 17, :null => false
|
||||
end
|
||||
|
||||
end
|
7
db/migrate/20131203192610_add_indexes_to_portlets.rb
Normal file
7
db/migrate/20131203192610_add_indexes_to_portlets.rb
Normal file
@ -0,0 +1,7 @@
|
||||
class AddIndexesToPortlets < ActiveRecord::Migration
|
||||
def change
|
||||
add_index :windows, :channel_id
|
||||
add_index :portlet_window_details, :portlet_window_id
|
||||
end
|
||||
end
|
||||
|
@ -0,0 +1,6 @@
|
||||
class AddIndexToChartWindowDetails < ActiveRecord::Migration
|
||||
def change
|
||||
add_index :chart_window_details, :chart_window_id
|
||||
end
|
||||
end
|
||||
|
@ -0,0 +1,6 @@
|
||||
class AddPersistenceIndexToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
add_index :users, :persistence_token
|
||||
end
|
||||
end
|
||||
|
@ -0,0 +1,6 @@
|
||||
class AddIndexToPluginWindowDetails < ActiveRecord::Migration
|
||||
def change
|
||||
add_index :plugin_window_details, :plugin_window_id
|
||||
end
|
||||
end
|
||||
|
6
db/migrate/20131218181245_add_api_key_to_users.rb
Normal file
6
db/migrate/20131218181245_add_api_key_to_users.rb
Normal file
@ -0,0 +1,6 @@
|
||||
class AddApiKeyToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :api_key, :string, :limit => 16
|
||||
end
|
||||
end
|
||||
|
@ -0,0 +1,6 @@
|
||||
class AddIndexOnApiKeysToUser < ActiveRecord::Migration
|
||||
def change
|
||||
add_index :users, :api_key
|
||||
end
|
||||
end
|
||||
|
15
db/migrate/20140121232049_create_daily_feeds.rb
Normal file
15
db/migrate/20140121232049_create_daily_feeds.rb
Normal file
@ -0,0 +1,15 @@
|
||||
class CreateDailyFeeds < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :daily_feeds do |t|
|
||||
t.integer :channel_id
|
||||
t.date :date
|
||||
t.string :calculation, :limit => 20
|
||||
t.string :result
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :daily_feeds, [:channel_id, :date]
|
||||
end
|
||||
end
|
||||
|
@ -0,0 +1,12 @@
|
||||
class RemoveTimestampsFromDailyFeeds < ActiveRecord::Migration
|
||||
def up
|
||||
remove_column :daily_feeds, :created_at
|
||||
remove_column :daily_feeds, :updated_at
|
||||
end
|
||||
|
||||
def down
|
||||
add_column :daily_feeds, :created_at, :datetime
|
||||
add_column :daily_feeds, :updated_at, :datetime
|
||||
end
|
||||
end
|
||||
|
6
db/migrate/20140122223014_add_field_to_daily_feeds.rb
Normal file
6
db/migrate/20140122223014_add_field_to_daily_feeds.rb
Normal file
@ -0,0 +1,6 @@
|
||||
class AddFieldToDailyFeeds < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :daily_feeds, :field, :integer, :limit => 1
|
||||
end
|
||||
end
|
||||
|
6
db/migrate/20140130213435_remove_raw_data_from_feeds.rb
Normal file
6
db/migrate/20140130213435_remove_raw_data_from_feeds.rb
Normal file
@ -0,0 +1,6 @@
|
||||
class RemoveRawDataFromFeeds < ActiveRecord::Migration
|
||||
def change
|
||||
remove_column :feeds, :raw_data
|
||||
end
|
||||
end
|
||||
|
@ -0,0 +1,6 @@
|
||||
class ChangeTwitterAccountsTwitterId < ActiveRecord::Migration
|
||||
def change
|
||||
change_column :twitter_accounts, :twitter_id, :integer, :limit => 8
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user