Class: CreateBigbluebuttonRails

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/bigbluebutton_rails/templates/migration.rb

Class Method Summary collapse

Class Method Details

.downObject



36
37
38
39
# File 'lib/generators/bigbluebutton_rails/templates/migration.rb', line 36

def self.down
  drop_table :bigbluebutton_rooms
  drop_table :bigbluebutton_servers
end

.upObject



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/generators/bigbluebutton_rails/templates/migration.rb', line 3

def self.up
  create_table :bigbluebutton_servers do |t|
    t.string :name
    t.string :url
    t.string :salt
    t.string :version
    t.string :param
    t.timestamps
  end
  create_table :bigbluebutton_rooms do |t|
    t.integer :server_id
    t.integer :owner_id
    t.string :owner_type
    t.string :meetingid
    t.string :name
    t.string :attendee_password
    t.string :moderator_password
    t.string :welcome_msg
    t.string :logout_url
    t.string :voice_bridge
    t.string :dial_number
    t.integer :max_participants
    t.boolean :private, :default => false
    t.boolean :randomize_meetingid, :default => true
    t.boolean :external, :default => false
    t.string :param
    t.timestamps
  end
  add_index :bigbluebutton_rooms, :server_id
  add_index :bigbluebutton_rooms, :meetingid, :unique => true
  add_index :bigbluebutton_rooms, :voice_bridge, :unique => true
end