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
|
||||
|
345
db/schema.rb
345
db/schema.rb
@ -1,3 +1,4 @@
|
||||
# encoding: UTF-8
|
||||
# This file is auto-generated from the current state of the database. Instead
|
||||
# of editing this file, please use the migrations feature of Active Record to
|
||||
# incrementally modify your database, and then regenerate this schema definition.
|
||||
@ -8,29 +9,29 @@
|
||||
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
||||
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
||||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20110329210210) do
|
||||
ActiveRecord::Schema.define(version: 20140203191645) do
|
||||
|
||||
create_table "api_keys", :force => true do |t|
|
||||
t.string "api_key", :limit => 16
|
||||
create_table "api_keys", force: true do |t|
|
||||
t.string "api_key", limit: 16
|
||||
t.integer "channel_id"
|
||||
t.integer "user_id"
|
||||
t.boolean "write_flag", :default => false
|
||||
t.boolean "write_flag", default: false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "note"
|
||||
end
|
||||
|
||||
add_index "api_keys", ["api_key"], :name => "index_api_keys_on_api_key", :unique => true
|
||||
add_index "api_keys", ["channel_id"], :name => "index_api_keys_on_channel_id"
|
||||
add_index "api_keys", ["api_key"], name: "index_api_keys_on_api_key", unique: true, using: :btree
|
||||
add_index "api_keys", ["channel_id"], name: "index_api_keys_on_channel_id", using: :btree
|
||||
|
||||
create_table "channels", :force => true do |t|
|
||||
create_table "channels", force: true do |t|
|
||||
t.integer "user_id"
|
||||
t.string "name"
|
||||
t.string "description"
|
||||
t.decimal "latitude", :precision => 15, :scale => 10
|
||||
t.decimal "longitude", :precision => 15, :scale => 10
|
||||
t.decimal "latitude", precision: 15, scale: 10
|
||||
t.decimal "longitude", precision: 15, scale: 10
|
||||
t.string "field1"
|
||||
t.string "field2"
|
||||
t.string "field3"
|
||||
@ -51,7 +52,7 @@ ActiveRecord::Schema.define(:version => 20110329210210) do
|
||||
t.datetime "updated_at"
|
||||
t.string "elevation"
|
||||
t.integer "last_entry_id"
|
||||
t.boolean "public_flag", :default => false
|
||||
t.boolean "public_flag", default: false
|
||||
t.string "options1"
|
||||
t.string "options2"
|
||||
t.string "options3"
|
||||
@ -60,11 +61,93 @@ ActiveRecord::Schema.define(:version => 20110329210210) do
|
||||
t.string "options6"
|
||||
t.string "options7"
|
||||
t.string "options8"
|
||||
t.boolean "social", default: false
|
||||
t.string "slug"
|
||||
t.string "status"
|
||||
t.string "url"
|
||||
t.string "video_id"
|
||||
t.string "video_type"
|
||||
t.boolean "clearing", default: false, null: false
|
||||
t.integer "ranking"
|
||||
end
|
||||
|
||||
create_table "feeds", :force => true do |t|
|
||||
add_index "channels", ["public_flag", "last_entry_id", "updated_at"], name: "channels_public_viewable", using: :btree
|
||||
add_index "channels", ["ranking"], name: "index_channels_on_ranking", using: :btree
|
||||
add_index "channels", ["slug"], name: "index_channels_on_slug", using: :btree
|
||||
add_index "channels", ["user_id"], name: "index_channels_on_user_id", using: :btree
|
||||
|
||||
create_table "chart_window_details", force: true do |t|
|
||||
t.integer "chart_window_id"
|
||||
t.integer "field_number"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "options"
|
||||
end
|
||||
|
||||
add_index "chart_window_details", ["chart_window_id"], name: "index_chart_window_details_on_chart_window_id", using: :btree
|
||||
|
||||
create_table "commands", force: true do |t|
|
||||
t.string "command_string"
|
||||
t.integer "position"
|
||||
t.integer "talkback_id"
|
||||
t.datetime "executed_at"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
add_index "commands", ["talkback_id", "executed_at"], name: "index_commands_on_talkback_id_and_executed_at", using: :btree
|
||||
|
||||
create_table "comments", force: true do |t|
|
||||
t.integer "parent_id"
|
||||
t.text "body"
|
||||
t.integer "flags"
|
||||
t.integer "user_id"
|
||||
t.string "ip_address"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "channel_id"
|
||||
end
|
||||
|
||||
add_index "comments", ["channel_id"], name: "index_comments_on_channel_id", using: :btree
|
||||
|
||||
create_table "daily_feeds", force: true do |t|
|
||||
t.integer "channel_id"
|
||||
t.date "date"
|
||||
t.string "calculation", limit: 20
|
||||
t.string "result"
|
||||
t.integer "field", limit: 1
|
||||
end
|
||||
|
||||
add_index "daily_feeds", ["channel_id", "date"], name: "index_daily_feeds_on_channel_id_and_date", using: :btree
|
||||
|
||||
create_table "devices", force: true do |t|
|
||||
t.integer "user_id"
|
||||
t.string "title"
|
||||
t.string "model"
|
||||
t.string "ip_address"
|
||||
t.integer "port"
|
||||
t.string "mac_address"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "local_ip_address"
|
||||
t.integer "local_port"
|
||||
t.string "default_gateway"
|
||||
t.string "subnet_mask"
|
||||
end
|
||||
|
||||
add_index "devices", ["mac_address"], name: "index_devices_on_mac_address", using: :btree
|
||||
add_index "devices", ["user_id"], name: "index_devices_on_user_id", using: :btree
|
||||
|
||||
create_table "failedlogins", force: true do |t|
|
||||
t.string "login"
|
||||
t.string "password"
|
||||
t.string "ip_address"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
create_table "feeds", force: true do |t|
|
||||
t.integer "channel_id"
|
||||
t.text "raw_data"
|
||||
t.string "field1"
|
||||
t.string "field2"
|
||||
t.string "field3"
|
||||
@ -77,21 +160,200 @@ ActiveRecord::Schema.define(:version => 20110329210210) do
|
||||
t.datetime "updated_at"
|
||||
t.integer "entry_id"
|
||||
t.string "status"
|
||||
t.decimal "latitude", :precision => 15, :scale => 10
|
||||
t.decimal "longitude", :precision => 15, :scale => 10
|
||||
t.decimal "latitude", precision: 15, scale: 10
|
||||
t.decimal "longitude", precision: 15, scale: 10
|
||||
t.string "elevation"
|
||||
t.string "location"
|
||||
end
|
||||
|
||||
add_index "feeds", ["channel_id", "created_at"], :name => "index_feeds_on_channel_id_and_created_at"
|
||||
add_index "feeds", ["channel_id", "entry_id"], :name => "index_feeds_on_channel_id_and_entry_id"
|
||||
add_index "feeds", ["channel_id", "created_at"], name: "index_feeds_on_channel_id_and_created_at", using: :btree
|
||||
add_index "feeds", ["channel_id", "entry_id"], name: "index_feeds_on_channel_id_and_entry_id", using: :btree
|
||||
|
||||
create_table "users", :force => true do |t|
|
||||
t.string "login", :null => false
|
||||
t.string "email", :null => false
|
||||
t.string "crypted_password", :null => false
|
||||
t.string "password_salt", :null => false
|
||||
t.string "persistence_token", :null => false
|
||||
t.string "perishable_token", :null => false
|
||||
create_table "headers", force: true do |t|
|
||||
t.string "name"
|
||||
t.string "value"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "thinghttp_id"
|
||||
end
|
||||
|
||||
add_index "headers", ["thinghttp_id"], name: "index_headers_on_thinghttp_id", using: :btree
|
||||
|
||||
create_table "pipes", force: true do |t|
|
||||
t.string "name", null: false
|
||||
t.string "url", null: false
|
||||
t.string "slug", null: false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "parse"
|
||||
t.integer "cache"
|
||||
end
|
||||
|
||||
add_index "pipes", ["slug"], name: "index_pipes_on_slug", using: :btree
|
||||
|
||||
create_table "plugin_window_details", force: true do |t|
|
||||
t.integer "plugin_id"
|
||||
t.integer "plugin_window_id"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
add_index "plugin_window_details", ["plugin_window_id"], name: "index_plugin_window_details_on_plugin_window_id", using: :btree
|
||||
|
||||
create_table "plugins", force: true do |t|
|
||||
t.string "name"
|
||||
t.integer "user_id"
|
||||
t.text "html"
|
||||
t.text "css"
|
||||
t.text "js"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.boolean "private_flag", default: true
|
||||
end
|
||||
|
||||
add_index "plugins", ["user_id"], name: "index_plugins_on_user_id", using: :btree
|
||||
|
||||
create_table "portlet_window_details", force: true do |t|
|
||||
t.integer "portlet_window_id"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
add_index "portlet_window_details", ["portlet_window_id"], name: "index_portlet_window_details_on_portlet_window_id", using: :btree
|
||||
|
||||
create_table "reacts", force: true do |t|
|
||||
t.integer "user_id"
|
||||
t.string "name"
|
||||
t.string "react_type", limit: 10
|
||||
t.integer "run_interval"
|
||||
t.boolean "run_on_insertion", default: true, null: false
|
||||
t.datetime "last_run_at"
|
||||
t.integer "channel_id"
|
||||
t.integer "field_number"
|
||||
t.string "condition", limit: 15
|
||||
t.string "condition_value"
|
||||
t.float "condition_lat"
|
||||
t.float "condition_long"
|
||||
t.float "condition_elev"
|
||||
t.integer "actionable_id"
|
||||
t.boolean "last_result", default: false
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "actionable_type", default: "Thinghttp"
|
||||
t.string "action_value"
|
||||
t.string "latest_value"
|
||||
t.boolean "activated", default: true
|
||||
t.boolean "run_action_every_time", default: false
|
||||
end
|
||||
|
||||
add_index "reacts", ["channel_id", "run_on_insertion"], name: "index_reacts_on_channel_id_and_run_on_insertion", using: :btree
|
||||
add_index "reacts", ["channel_id"], name: "index_reacts_on_channel_id", using: :btree
|
||||
add_index "reacts", ["run_interval"], name: "index_reacts_on_run_interval", using: :btree
|
||||
add_index "reacts", ["user_id"], name: "index_reacts_on_user_id", using: :btree
|
||||
|
||||
create_table "scheduled_thinghttps", force: true do |t|
|
||||
t.integer "user_id"
|
||||
t.string "name"
|
||||
t.boolean "activated", default: true, null: false
|
||||
t.integer "run_interval"
|
||||
t.integer "thinghttp_id"
|
||||
t.integer "channel_id"
|
||||
t.string "field_name"
|
||||
t.datetime "last_run_at"
|
||||
t.string "last_result"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
add_index "scheduled_thinghttps", ["activated", "run_interval"], name: "index_scheduled_thinghttps_on_activated_and_run_interval", using: :btree
|
||||
add_index "scheduled_thinghttps", ["user_id"], name: "index_scheduled_thinghttps_on_user_id", using: :btree
|
||||
|
||||
create_table "taggings", force: true do |t|
|
||||
t.integer "tag_id"
|
||||
t.integer "channel_id"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
add_index "taggings", ["channel_id"], name: "index_taggings_on_channel_id", using: :btree
|
||||
add_index "taggings", ["tag_id"], name: "index_taggings_on_tag_id", using: :btree
|
||||
|
||||
create_table "tags", force: true do |t|
|
||||
t.string "name"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
add_index "tags", ["name"], name: "index_tags_on_name", using: :btree
|
||||
|
||||
create_table "talkbacks", force: true do |t|
|
||||
t.string "api_key", limit: 16
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "user_id"
|
||||
t.string "name"
|
||||
t.integer "channel_id"
|
||||
end
|
||||
|
||||
add_index "talkbacks", ["api_key"], name: "index_talkbacks_on_api_key", using: :btree
|
||||
add_index "talkbacks", ["user_id"], name: "index_talkbacks_on_user_id", using: :btree
|
||||
|
||||
create_table "thinghttps", force: true do |t|
|
||||
t.integer "user_id"
|
||||
t.string "api_key", limit: 16
|
||||
t.text "url"
|
||||
t.string "auth_name"
|
||||
t.string "auth_pass"
|
||||
t.string "method"
|
||||
t.string "content_type"
|
||||
t.string "http_version"
|
||||
t.string "host"
|
||||
t.text "body"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "name"
|
||||
t.string "parse"
|
||||
end
|
||||
|
||||
add_index "thinghttps", ["api_key"], name: "index_thinghttps_on_api_key", using: :btree
|
||||
add_index "thinghttps", ["user_id"], name: "index_thinghttps_on_user_id", using: :btree
|
||||
|
||||
create_table "tweetcontrols", force: true do |t|
|
||||
t.string "screen_name"
|
||||
t.string "trigger"
|
||||
t.string "control_type"
|
||||
t.integer "control_key"
|
||||
t.string "control_string"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.integer "user_id"
|
||||
end
|
||||
|
||||
add_index "tweetcontrols", ["screen_name"], name: "index_tweetcontrols_on_screen_name", using: :btree
|
||||
add_index "tweetcontrols", ["user_id"], name: "index_tweetcontrols_on_user_id", using: :btree
|
||||
|
||||
create_table "twitter_accounts", force: true do |t|
|
||||
t.string "screen_name"
|
||||
t.integer "user_id"
|
||||
t.integer "twitter_id", limit: 8
|
||||
t.string "token"
|
||||
t.string "secret"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "api_key", limit: 17, null: false
|
||||
end
|
||||
|
||||
add_index "twitter_accounts", ["api_key"], name: "index_twitters_on_api_key", using: :btree
|
||||
add_index "twitter_accounts", ["twitter_id"], name: "index_twitters_on_twitter_id", using: :btree
|
||||
add_index "twitter_accounts", ["user_id"], name: "index_twitters_on_user_id", using: :btree
|
||||
|
||||
create_table "users", force: true do |t|
|
||||
t.string "login", null: false
|
||||
t.string "email", null: false
|
||||
t.string "crypted_password", null: false
|
||||
t.string "password_salt", null: false
|
||||
t.string "persistence_token", null: false
|
||||
t.string "perishable_token", null: false
|
||||
t.datetime "current_login_at"
|
||||
t.datetime "last_login_at"
|
||||
t.string "current_login_ip"
|
||||
@ -99,6 +361,41 @@ ActiveRecord::Schema.define(:version => 20110329210210) do
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.string "time_zone"
|
||||
t.boolean "public_flag", default: false
|
||||
t.text "bio"
|
||||
t.string "website"
|
||||
t.string "api_key", limit: 16
|
||||
end
|
||||
|
||||
add_index "users", ["api_key"], name: "index_users_on_api_key", using: :btree
|
||||
add_index "users", ["email"], name: "index_users_on_email", using: :btree
|
||||
add_index "users", ["login"], name: "index_users_on_login", using: :btree
|
||||
add_index "users", ["persistence_token"], name: "index_users_on_persistence_token", using: :btree
|
||||
|
||||
create_table "watchings", force: true do |t|
|
||||
t.integer "user_id"
|
||||
t.integer "channel_id"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
add_index "watchings", ["user_id", "channel_id"], name: "index_watchings_on_user_id_and_channel_id", using: :btree
|
||||
|
||||
create_table "windows", force: true do |t|
|
||||
t.integer "channel_id"
|
||||
t.integer "position"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
t.text "html"
|
||||
t.integer "col"
|
||||
t.string "title"
|
||||
t.string "wtype"
|
||||
t.string "name"
|
||||
t.string "type"
|
||||
t.boolean "private_flag", default: false
|
||||
t.boolean "show_flag", default: true
|
||||
end
|
||||
|
||||
add_index "windows", ["channel_id"], name: "index_windows_on_channel_id", using: :btree
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user