Skip to content

Commit

Permalink
Remove unused db column
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur Beljajev committed Aug 11, 2019
1 parent d34e643 commit a4efa21
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
1 change: 0 additions & 1 deletion app/models/invoice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ class Invoice < ActiveRecord::Base
include Concerns::Invoice::Cancellable
include Concerns::Invoice::Payable

belongs_to :seller, class_name: 'Registrar'
belongs_to :buyer, class_name: 'Registrar'
has_one :account_activity
has_many :items, class_name: 'InvoiceItem', dependent: :destroy
Expand Down
5 changes: 5 additions & 0 deletions db/migrate/20190811184334_remove_invoices_seller_id.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class RemoveInvoicesSellerId < ActiveRecord::Migration
def change
remove_column :invoices, :seller_id
end
end
10 changes: 2 additions & 8 deletions db/structure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,6 @@ CREATE TABLE public.invoices (
description character varying,
reference_no character varying NOT NULL,
vat_rate numeric(4,3) NOT NULL,
seller_id integer,
seller_name character varying NOT NULL,
seller_reg_no character varying,
seller_iban character varying NOT NULL,
Expand Down Expand Up @@ -3453,13 +3452,6 @@ CREATE INDEX index_invoice_items_on_invoice_id ON public.invoice_items USING btr
CREATE INDEX index_invoices_on_buyer_id ON public.invoices USING btree (buyer_id);


--
-- Name: index_invoices_on_seller_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--

CREATE INDEX index_invoices_on_seller_id ON public.invoices USING btree (seller_id);


--
-- Name: index_keyrelays_on_accepter_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
Expand Down Expand Up @@ -4817,3 +4809,5 @@ INSERT INTO schema_migrations (version) VALUES ('20190617122505');

INSERT INTO schema_migrations (version) VALUES ('20190620084334');

INSERT INTO schema_migrations (version) VALUES ('20190811184334');

0 comments on commit a4efa21

Please sign in to comment.