From b80bd744ad873f6fc43018bc4bfb90677de167bd Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 17 Dec 2012 12:01:45 +0100 Subject: Start of GS5. --- db/migrate/20111104140900_create_channels.rb | 42 ++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 db/migrate/20111104140900_create_channels.rb (limited to 'db/migrate/20111104140900_create_channels.rb') diff --git a/db/migrate/20111104140900_create_channels.rb b/db/migrate/20111104140900_create_channels.rb new file mode 100644 index 0000000..eb81844 --- /dev/null +++ b/db/migrate/20111104140900_create_channels.rb @@ -0,0 +1,42 @@ +class CreateChannels < ActiveRecord::Migration + def self.up + create_table :channels, :id => false do |t| + t.string :uuid, :limit=>'256', :primary => true + t.string :direction, :limit=>'32' + t.string :created, :limit=>'128' + t.integer :created_epoch + t.string :name, :limit=>'1024' + t.string :state, :limit=>'64' + t.string :cid_name, :limit=>'1024' + t.string :cid_num, :limit=>'256' + t.string :ip_addr, :limit=>'256' + t.string :dest, :limit=>'1024' + t.string :application, :limit=>'128' + t.string :application_data, :limit=>'4096' + t.string :dialplan, :limit=>'128' + t.string :context, :limit=>'128' + t.string :read_codec, :limit=>'128' + t.string :read_rate, :limit=>'32' + t.string :read_bit_rate, :limit=>'32' + t.string :write_codec, :limit=>'128' + t.string :write_rate, :limit=>'32' + t.string :write_bit_rate, :limit=>'32' + t.string :secure, :limit=>'32' + t.string :hostname, :limit=>'256' + t.string :presence_id, :limit=>'4096' + t.string :presence_data, :limit=>'4096' + t.string :callstate, :limit=>'64' + t.string :callee_name, :limit=>'1024' + t.string :callee_num, :limit=>'256' + t.string :callee_direction, :limit=>'5' + t.string :call_uuid, :limit=>'256' + end + add_index :channels, [ :hostname ], :unique => false, :name => 'channels1' + add_index :channels, [ :uuid, :hostname ], :unique => true, :name => 'uuindex' + add_index :channels, [ :call_uuid, :hostname ], :unique => false, :name => 'uuindex2' + end + + def self.down + drop_table :channels + end +end -- cgit v1.2.3