summaryrefslogtreecommitdiff
path: root/db/migrate/20120228154913_create_cdrs.rb
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-17 12:01:45 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2012-12-17 12:01:45 +0100
commitb80bd744ad873f6fc43018bc4bfb90677de167bd (patch)
tree072c4b0e33d442528555b82c415f5e7a1712b2b0 /db/migrate/20120228154913_create_cdrs.rb
parent3e706c2025ecc5523e81ad649639ef2ff75e7bac (diff)
Start of GS5.
Diffstat (limited to 'db/migrate/20120228154913_create_cdrs.rb')
-rw-r--r--db/migrate/20120228154913_create_cdrs.rb33
1 files changed, 33 insertions, 0 deletions
diff --git a/db/migrate/20120228154913_create_cdrs.rb b/db/migrate/20120228154913_create_cdrs.rb
new file mode 100644
index 0000000..f9f92b7
--- /dev/null
+++ b/db/migrate/20120228154913_create_cdrs.rb
@@ -0,0 +1,33 @@
+class CreateCdrs < ActiveRecord::Migration
+ def self.up
+ create_table :cdrs, :id => false do |t|
+ t.string :uuid, :limit => '256', :primary => true
+ t.integer :account_id
+ t.string :account_type, :limit => '256'
+ t.string :bleg_uuid, :limit => '256'
+ t.integer :bleg_account_id
+ t.string :bleg_account_type, :limit => '256'
+ t.string :dialed_number, :limit => '256'
+ t.string :destination_number, :limit => '256'
+ t.string :caller_id_number, :limit => '256'
+ t.string :caller_id_name, :limit => '256'
+ t.string :callee_id_number, :limit => '256'
+ t.string :callee_id_name, :limit => '256'
+ t.datetime :start_stamp
+ t.datetime :answer_stamp
+ t.datetime :end_stamp
+ t.integer :duration
+ t.integer :billsec
+ t.string :hangup_cause, :limit => '256'
+ t.string :dialstatus, :limit => '256'
+ t.string :forwarding_number, :limit => '256'
+ t.integer :forwarding_account_id
+ t.string :forwarding_account_type, :limit => '256'
+ t.string :forwarding_service, :limit => '256'
+ end
+ end
+
+ def self.down
+ drop_table :cdrs
+ end
+end