From d73990d5b243fa47f85b8f911938da2e4ce2cc03 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 6 Oct 2022 08:35:42 +0200 Subject: [PATCH] delete granted_by column --- files/classes/award.py | 1 - schema.sql | 10 ---------- 2 files changed, 11 deletions(-) diff --git a/files/classes/award.py b/files/classes/award.py index d64970e95..751b8b0d7 100644 --- a/files/classes/award.py +++ b/files/classes/award.py @@ -15,7 +15,6 @@ class AwardRelationship(Base): comment_id = Column(Integer, ForeignKey("comments.id")) kind = Column(String) awarded_utc = Column(Integer) - granted_by = Column(Integer, ForeignKey("users.id")) created_utc = Column(Integer) user = relationship("User", primaryjoin="AwardRelationship.user_id==User.id", back_populates="awards") diff --git a/schema.sql b/schema.sql index 806974595..d1a8f7e27 100644 --- a/schema.sql +++ b/schema.sql @@ -167,7 +167,6 @@ CREATE TABLE public.award_relationships ( kind character varying(20) NOT NULL, awarded_utc integer, created_utc integer, - granted_by integer ); @@ -2101,14 +2100,6 @@ ALTER TABLE ONLY public.award_relationships ADD CONSTRAINT award_comment_fkey FOREIGN KEY (comment_id) REFERENCES public.comments(id); --- --- Name: award_relationships award_granted_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - --- - -ALTER TABLE ONLY public.award_relationships - ADD CONSTRAINT award_granted_by_fkey FOREIGN KEY (granted_by) REFERENCES public.users(id); - - -- -- Name: award_relationships award_submission_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -2688,4 +2679,3 @@ ALTER TABLE ONLY public.comment_option_votes -- -- PostgreSQL database dump complete -- -