Skip to content
This repository was archived by the owner on Mar 7, 2018. It is now read-only.

Commit

Permalink
Merge pull request #112 from lshift/master
Browse files Browse the repository at this point in the history
Instructions for migrating to a new schema
  • Loading branch information
melissacline committed Apr 28, 2016
2 parents 12df32b + e7bd6fc commit afc7bbf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions django/data/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@ class Migration(migrations.Migration):
]

operations = [
migrations.RunSQL("""DROP TABLE IF EXISTS variant CASCADE;
DROP FUNCTION IF EXISTS variant_fts_trigger();
"""),
migrations.CreateModel(
name='Variant',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
# These are some extra derived columns that help with filtering
('Variant_in_ENIGMA', models.BooleanField(default=False)),
('Variant_in_ClinVar', models.BooleanField(default=False)),
('Variant_in_1000_Genomes', models.BooleanField(default=False)),
Expand All @@ -25,6 +29,7 @@ class Migration(migrations.Migration):
('Variant_in_BIC', models.BooleanField(default=False)),
('Variant_in_ESP', models.BooleanField(default=False)),
('Variant_in_exLOVD', models.BooleanField(default=False)),

('Source', models.TextField()),
('URL_ENIGMA', models.TextField()),
('Condition_ID_type_ENIGMA', models.TextField()),
Expand Down
1 change: 1 addition & 0 deletions django/data/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ def create_variant(self, row):


class Variant(models.Model):
# These are some extra derived columns that help with filtering
Variant_in_ENIGMA = models.BooleanField(default=False)
Variant_in_ClinVar = models.BooleanField(default=False)
Variant_in_1000_Genomes = models.BooleanField(default=False)
Expand Down

0 comments on commit afc7bbf

Please sign in to comment.