Skip to content

Commit

Permalink
Add concerto-hardware db stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
augustf committed Feb 19, 2014
1 parent 4a12ec5 commit 0ab1f51
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
@@ -0,0 +1,13 @@
# This migration comes from hardware (originally 20121220000000)
class CreateConcertoHardwarePlayers < ActiveRecord::Migration
def change
create_table :concerto_hardware_players do |t|
t.string :secret
t.string :ip_address
t.integer :screen_id
t.boolean :activated

t.timestamps
end
end
end
@@ -0,0 +1,7 @@
# This migration comes from hardware (originally 20131127201048)
class AddUpdatesToConcertoHardwarePlayers < ActiveRecord::Migration
def change
remove_column :concerto_hardware_players, :secret
add_column :concerto_hardware_players, :screen_on_off, :string
end
end
11 changes: 10 additions & 1 deletion db/schema.rb
Expand Up @@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.

ActiveRecord::Schema.define(:version => 20131221173425) do
ActiveRecord::Schema.define(:version => 20140219024718) do

create_table "activities", :force => true do |t|
t.integer "trackable_id"
Expand Down Expand Up @@ -47,6 +47,15 @@

add_index "concerto_configs", ["key"], :name => "index_concerto_configs_on_key", :unique => true

create_table "concerto_hardware_players", :force => true do |t|
t.string "ip_address"
t.integer "screen_id"
t.boolean "activated"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "screen_on_off"
end

create_table "concerto_plugins", :force => true do |t|
t.boolean "enabled"
t.string "gem_name"
Expand Down

3 comments on commit 0ab1f51

@zr2d2
Copy link
Member

@zr2d2 zr2d2 commented on 0ab1f51 Apr 27, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we adding plugin migrations directly to Concerto? Shouldn't migrations be copied in when you install the plugin?

@augustf
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is because we want hardware to be a default plugin, and leaving its migration unresolved created problems with developer workflow.

@zr2d2
Copy link
Member

@zr2d2 zr2d2 commented on 0ab1f51 Apr 27, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, they were preventing rake db:migrate from running when I was trying to rebuild my database, so it seems like they may still pose a problem

Please sign in to comment.