From 5a4689e97e2f2411ffca9bd268b2e04724a76e92 Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Wed, 7 Nov 2018 21:15:13 +0200 Subject: [PATCH] Remove unused `whois_records.body` DB column Closes #131 --- ...0181102124618_remove_whois_records_body.rb | 9 ++ db/schema.rb | 3 +- test/fixtures/whois_records.yml | 103 ------------------ 3 files changed, 10 insertions(+), 105 deletions(-) create mode 100644 db/migrate/20181102124618_remove_whois_records_body.rb diff --git a/db/migrate/20181102124618_remove_whois_records_body.rb b/db/migrate/20181102124618_remove_whois_records_body.rb new file mode 100644 index 00000000..cd19c475 --- /dev/null +++ b/db/migrate/20181102124618_remove_whois_records_body.rb @@ -0,0 +1,9 @@ +class RemoveWhoisRecordsBody < ActiveRecord::Migration[5.2] + def up + remove_column :whois_records, :body + end + + def down + add_column :whois_records, :body, :text + end +end diff --git a/db/schema.rb b/db/schema.rb index 019f8df5..9353bd80 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2018_06_27_115124) do +ActiveRecord::Schema.define(version: 2018_11_02_124618) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -33,7 +33,6 @@ create_table "whois_records", force: :cascade do |t| t.string "name" - t.text "body" t.json "json" t.datetime "created_at", null: false t.datetime "updated_at", null: false diff --git a/test/fixtures/whois_records.yml b/test/fixtures/whois_records.yml index c4d2ba2d..7f52a18d 100644 --- a/test/fixtures/whois_records.yml +++ b/test/fixtures/whois_records.yml @@ -1,51 +1,5 @@ --- privately_owned: - body: | - The information obtained through .ee WHOIS is subject to database - protection according to the Estonian Copyright Act and international - conventions. All rights are reserved to Estonian Internet Foundation. - Search results may not be used for commercial, advertising, recompilation, - repackaging, redistribution, reuse, obscuring or other similar activities. - Downloading of information about domain names for the creation of your own - database is not permitted. If any of the information from .ee WHOIS is - transferred to a third party, it must be done in its entirety. This server - must not be used as a backend for a search engine. - - Estonia .ee Top Level Domain WHOIS server - - Domain: - name: privatedomain.test - status: inactive - registered: 2018-04-25 14:10:41 +03:00 - changed: 2018-04-25 14:10:41 +03:00 - expire: 2018-07-25 - outzone: - delete: - - Registrant: - name: Private Person - email: Not Disclosed - changed: Not Disclosed - - Administrative contact: - name: Not Disclosed - email: Not Disclosed - changed: Not Disclosed - - - Technical contact: - name: Not Disclosed - email: Not Disclosed - changed: Not Disclosed - - Registrar: - name: test - url: - phone: - changed: 2018-04-25 14:10:39 +03:00 - - Estonia .ee Top Level Domain WHOIS server - More information at http://internet.ee json: admin_contacts: - @@ -83,54 +37,6 @@ privately_owned: legally_owned: - body: | - The information obtained through .ee WHOIS is subject to database - protection according to the Estonian Copyright Act and international - conventions. All rights are reserved to Estonian Internet Foundation. - Search results may not be used for commercial, advertising, recompilation, - repackaging, redistribution, reuse, obscuring or other similar activities. - Downloading of information about domain names for the creation of your own - database is not permitted. If any of the information from .ee WHOIS is - transferred to a third party, it must be done in its entirety. This server - must not be used as a backend for a search engine. - - Estonia .ee Top Level Domain WHOIS server - - Domain: - name: company-domain.test - status: inactive - registered: 2018-04-25 14:10:41 +03:00 - changed: 2018-04-25 14:10:41 +03:00 - expire: 2018-07-25 - outzone: - delete: - - Registrant: - name: Private Person - email: Not Disclosed - org id: 123 - country: EE - changed: Not Disclosed - - Administrative contact: - name: Not Disclosed - email: Not Disclosed - changed: Not Disclosed - - - Technical contact: - name: Not Disclosed - email: Not Disclosed - changed: Not Disclosed - - Registrar: - name: test - url: - phone: - changed: 2018-04-25 14:10:39 +03:00 - - Estonia .ee Top Level Domain WHOIS server - More information at http://internet.ee json: admin_contacts: - @@ -169,15 +75,6 @@ legally_owned: name: company-domain.test discarded: - body: | - Estonia .ee Top Level Domain WHOIS server - - Domain: - name: discarded-domain.test - status: deleteCandidate - - Estonia .ee Top Level Domain WHOIS server - More information at http://internet.ee json: name: discarded-domain.test status: