Skip to content

Commit

Permalink
Fix migrations
Browse files Browse the repository at this point in the history
  • Loading branch information
tnaccarato committed Aug 13, 2024
1 parent d5d03e2 commit a49bc32
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 60 deletions.
49 changes: 23 additions & 26 deletions db_backup.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-- Dumped from database version 16.3
-- Dumped by pg_dump version 16.3

-- Started on 2024-08-13 11:26:30
-- Started on 2024-08-13 11:43:24

SET statement_timeout = 0;
SET lock_timeout = 0;
Expand All @@ -23,7 +23,7 @@ SET default_tablespace = '';
SET default_table_access_method = heap;

--
-- TOC entry 237 (class 1259 OID 35053)
-- TOC entry 237 (class 1259 OID 35120)
-- Name: api_temporarycsvdata; Type: TABLE; Schema: public; Owner: postgres
--

Expand All @@ -38,7 +38,7 @@ CREATE TABLE public.api_temporarycsvdata (
ALTER TABLE public.api_temporarycsvdata OWNER TO postgres;

--
-- TOC entry 236 (class 1259 OID 35052)
-- TOC entry 236 (class 1259 OID 35119)
-- Name: api_temporarycsvdata_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

Expand Down Expand Up @@ -389,7 +389,7 @@ ALTER TABLE public.hla_phewas_catalog ALTER COLUMN id ADD GENERATED BY DEFAULT A


--
-- TOC entry 4982 (class 0 OID 35053)
-- TOC entry 4982 (class 0 OID 35120)
-- Dependencies: 237
-- Data for Name: api_temporarycsvdata; Type: TABLE DATA; Schema: public; Owner: postgres
--
Expand Down Expand Up @@ -566,11 +566,8 @@ COPY public.django_migrations (id, app, name, applied) FROM stdin;
18 mainapp 0001_initial 2024-06-05 12:22:30.422926+01
19 sessions 0001_initial 2024-06-05 12:22:30.429435+01
20 mainapp 0002_hlaphewascatalog_snp 2024-06-05 18:56:53.021445+01
21 mainapp 0003_gene_snp_allele_hlaphewascatalogrefactor 2024-08-01 13:33:39.286535+01
22 mainapp 0003_gene_phewas_snp_allele_hlaphewascatalogrefactor 2024-08-01 13:42:12.867089+01
23 mainapp 0003_alter_hlaphewascatalog_index_together_and_more 2024-08-02 15:48:36.04713+01
24 api 0001_initial 2024-08-13 06:57:45.405323+01
25 mainapp 0004_rename_hlaphewascatalog_phewas_string_snp_hla_phewas__phewas__cf5a4b_idx_and_more 2024-08-13 11:18:46.274244+01
26 api 0001_initial 2024-08-13 11:40:15.019594+01
27 mainapp 0003_hlaphewascatalog_snp_idx_and_more 2024-08-13 11:42:40.140259+01
\.


Expand Down Expand Up @@ -241450,7 +241447,7 @@ SELECT pg_catalog.setval('public.django_content_type_id_seq', 12, true);
-- Name: django_migrations_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.django_migrations_id_seq', 25, true);
SELECT pg_catalog.setval('public.django_migrations_id_seq', 27, true);


--
Expand All @@ -241463,7 +241460,7 @@ SELECT pg_catalog.setval('public.hla_phewas_catalog_id_seq', 1297813, true);


--
-- TOC entry 4807 (class 2606 OID 35059)
-- TOC entry 4807 (class 2606 OID 35126)
-- Name: api_temporarycsvdata api_temporarycsvdata_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

Expand Down Expand Up @@ -241706,15 +241703,15 @@ CREATE INDEX auth_user_username_6821ab7c_like ON public.auth_user USING btree (u


--
-- TOC entry 4786 (class 1259 OID 17195)
-- TOC entry 4786 (class 1259 OID 35130)
-- Name: category_string_idx; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX category_string_idx ON public.hla_phewas_catalog USING btree (category_string);


--
-- TOC entry 4787 (class 1259 OID 17199)
-- TOC entry 4787 (class 1259 OID 35134)
-- Name: chromosome_idx; Type: INDEX; Schema: public; Owner: postgres
--

Expand Down Expand Up @@ -241754,95 +241751,95 @@ CREATE INDEX django_session_session_key_c0390e0f_like ON public.django_session U


--
-- TOC entry 4788 (class 1259 OID 17198)
-- TOC entry 4788 (class 1259 OID 35133)
-- Name: gene_name_idx; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX gene_name_idx ON public.hla_phewas_catalog USING btree (gene_name);


--
-- TOC entry 4789 (class 1259 OID 17190)
-- TOC entry 4789 (class 1259 OID 35137)
-- Name: hla_phewas__categor_2cb8d8_idx; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX hla_phewas__categor_2cb8d8_idx ON public.hla_phewas_catalog USING btree (category_string, phewas_string);


--
-- TOC entry 4790 (class 1259 OID 17188)
-- TOC entry 4790 (class 1259 OID 35138)
-- Name: hla_phewas__phewas__cf5a4b_idx; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX hla_phewas__phewas__cf5a4b_idx ON public.hla_phewas_catalog USING btree (phewas_string, snp);


--
-- TOC entry 4791 (class 1259 OID 17189)
-- TOC entry 4791 (class 1259 OID 35140)
-- Name: hla_phewas__snp_137310_idx; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX hla_phewas__snp_137310_idx ON public.hla_phewas_catalog USING btree (snp, odds_ratio);


--
-- TOC entry 4792 (class 1259 OID 17191)
-- TOC entry 4792 (class 1259 OID 35139)
-- Name: hla_phewas__snp_b8d730_idx; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX hla_phewas__snp_b8d730_idx ON public.hla_phewas_catalog USING btree (snp, p);


--
-- TOC entry 4795 (class 1259 OID 17196)
-- TOC entry 4795 (class 1259 OID 35131)
-- Name: odds_ratio_idx; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX odds_ratio_idx ON public.hla_phewas_catalog USING btree (odds_ratio);


--
-- TOC entry 4796 (class 1259 OID 17197)
-- TOC entry 4796 (class 1259 OID 35132)
-- Name: p_value_idx; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX p_value_idx ON public.hla_phewas_catalog USING btree (p);


--
-- TOC entry 4797 (class 1259 OID 17193)
-- TOC entry 4797 (class 1259 OID 35128)
-- Name: phewas_code_idx; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX phewas_code_idx ON public.hla_phewas_catalog USING btree (phewas_code);


--
-- TOC entry 4798 (class 1259 OID 17194)
-- TOC entry 4798 (class 1259 OID 35129)
-- Name: phewas_string_idx; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX phewas_string_idx ON public.hla_phewas_catalog USING btree (phewas_string);


--
-- TOC entry 4799 (class 1259 OID 17200)
-- TOC entry 4799 (class 1259 OID 35135)
-- Name: serotype_idx; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX serotype_idx ON public.hla_phewas_catalog USING btree (serotype);


--
-- TOC entry 4800 (class 1259 OID 17192)
-- TOC entry 4800 (class 1259 OID 35127)
-- Name: snp_idx; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX snp_idx ON public.hla_phewas_catalog USING btree (snp);


--
-- TOC entry 4801 (class 1259 OID 17201)
-- TOC entry 4801 (class 1259 OID 35136)
-- Name: subtype_idx; Type: INDEX; Schema: public; Owner: postgres
--

Expand Down Expand Up @@ -241930,7 +241927,7 @@ ALTER TABLE ONLY public.django_admin_log
ADD CONSTRAINT django_admin_log_user_id_c564eba6_fk_auth_user_id FOREIGN KEY (user_id) REFERENCES public.auth_user(id) DEFERRABLE INITIALLY DEFERRED;


-- Completed on 2024-08-13 11:26:31
-- Completed on 2024-08-13 11:43:24

--
-- PostgreSQL database dump complete
Expand Down
2 changes: 1 addition & 1 deletion vis_phewas/api/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 5.0.7 on 2024-08-13 05:57
# Generated by Django 5.1 on 2024-08-13 10:37

from django.db import migrations, models

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Generated by Django 5.1 on 2024-08-13 10:37

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('mainapp', '0002_hlaphewascatalog_snp'),
]

operations = [
migrations.AddIndex(
model_name='hlaphewascatalog',
index=models.Index(fields=['snp'], name='snp_idx'),
),
migrations.AddIndex(
model_name='hlaphewascatalog',
index=models.Index(fields=['phewas_code'], name='phewas_code_idx'),
),
migrations.AddIndex(
model_name='hlaphewascatalog',
index=models.Index(fields=['phewas_string'], name='phewas_string_idx'),
),
migrations.AddIndex(
model_name='hlaphewascatalog',
index=models.Index(fields=['category_string'], name='category_string_idx'),
),
migrations.AddIndex(
model_name='hlaphewascatalog',
index=models.Index(fields=['odds_ratio'], name='odds_ratio_idx'),
),
migrations.AddIndex(
model_name='hlaphewascatalog',
index=models.Index(fields=['p'], name='p_value_idx'),
),
migrations.AddIndex(
model_name='hlaphewascatalog',
index=models.Index(fields=['gene_name'], name='gene_name_idx'),
),
migrations.AddIndex(
model_name='hlaphewascatalog',
index=models.Index(fields=['chromosome'], name='chromosome_idx'),
),
migrations.AddIndex(
model_name='hlaphewascatalog',
index=models.Index(fields=['serotype'], name='serotype_idx'),
),
migrations.AddIndex(
model_name='hlaphewascatalog',
index=models.Index(fields=['subtype'], name='subtype_idx'),
),
migrations.AddIndex(
model_name='hlaphewascatalog',
index=models.Index(fields=['category_string', 'phewas_string'], name='hla_phewas__categor_2cb8d8_idx'),
),
migrations.AddIndex(
model_name='hlaphewascatalog',
index=models.Index(fields=['phewas_string', 'snp'], name='hla_phewas__phewas__cf5a4b_idx'),
),
migrations.AddIndex(
model_name='hlaphewascatalog',
index=models.Index(fields=['snp', 'p'], name='hla_phewas__snp_b8d730_idx'),
),
migrations.AddIndex(
model_name='hlaphewascatalog',
index=models.Index(fields=['snp', 'odds_ratio'], name='hla_phewas__snp_137310_idx'),
),
]

This file was deleted.

0 comments on commit a49bc32

Please sign in to comment.