From 2d2c81765b0a68446a94a7fcba34758a3aa886c0 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 28 Nov 2016 13:36:47 +0100 Subject: Adding embedded PuSH server --- db/migrate/20161128103007_create_subscriptions.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 db/migrate/20161128103007_create_subscriptions.rb (limited to 'db/migrate') diff --git a/db/migrate/20161128103007_create_subscriptions.rb b/db/migrate/20161128103007_create_subscriptions.rb new file mode 100644 index 000000000..46443680a --- /dev/null +++ b/db/migrate/20161128103007_create_subscriptions.rb @@ -0,0 +1,15 @@ +class CreateSubscriptions < ActiveRecord::Migration[5.0] + def change + create_table :subscriptions do |t| + t.string :callback_url, null: false, default: '' + t.string :secret + t.datetime :expires_at, null: true, default: nil + t.boolean :confirmed, null: false, default: false + t.integer :account_id, null: false + + t.timestamps + end + + add_index :subscriptions, [:callback_url, :account_id], unique: true + end +end -- cgit