From 347c699d409674f6221bbf770b07e6819a6a5b82 Mon Sep 17 00:00:00 2001 From: James Williams Date: Fri, 4 Mar 2016 14:03:55 -0700 Subject: [PATCH] drop authorization_codes not used anymore refs #CNVS-27773 Change-Id: I19c27754f67bc8a11c0c0cd628c5b427197779a1 Reviewed-on: https://gerrit.instructure.com/73799 Tested-by: Jenkins Reviewed-by: Jeremy Stanley Product-Review: James Williams QA-Review: James Williams --- app/models/authorization_code.rb | 22 ------------------- ...20160304205401_drop_authorization_codes.rb | 20 +++++++++++++++++ 2 files changed, 20 insertions(+), 22 deletions(-) delete mode 100644 app/models/authorization_code.rb create mode 100644 db/migrate/20160304205401_drop_authorization_codes.rb diff --git a/app/models/authorization_code.rb b/app/models/authorization_code.rb deleted file mode 100644 index 89854cb0524..00000000000 --- a/app/models/authorization_code.rb +++ /dev/null @@ -1,22 +0,0 @@ -# -# Copyright (C) 2011 Instructure, Inc. -# -# This file is part of Canvas. -# -# Canvas is free software: you can redistribute it and/or modify it under -# the terms of the GNU Affero General Public License as published by the Free -# Software Foundation, version 3 of the License. -# -# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more -# details. -# -# You should have received a copy of the GNU Affero General Public License along -# with this program. If not, see . -# - -class AuthorizationCode < ActiveRecord::Base - belongs_to :account - attr_accessible -end diff --git a/db/migrate/20160304205401_drop_authorization_codes.rb b/db/migrate/20160304205401_drop_authorization_codes.rb new file mode 100644 index 00000000000..30c7e76e9c1 --- /dev/null +++ b/db/migrate/20160304205401_drop_authorization_codes.rb @@ -0,0 +1,20 @@ +class DropAuthorizationCodes < ActiveRecord::Migration + tag :postdeploy + + def up + drop_table :authorization_codes + end + + def down + create_table "authorization_codes", :force => true do |t| + t.string "authorization_code" + t.string "authorization_service" + t.integer "account_id", :limit => 8 + t.datetime "created_at" + t.datetime "updated_at" + t.integer "associated_account_id", :limit => 8 + end + + add_index "authorization_codes", ["account_id"], :name => "index_authorization_codes_on_account_id" + end +end