From c791711871535f2363e9216b4706f8e820d48953 Mon Sep 17 00:00:00 2001 From: tjgorrie Date: Fri, 27 Nov 2020 16:11:06 +0000 Subject: [PATCH] Adding migrations --- xchem_db/migrations/0001_initial.py | 653 ++++++++++++++++++++++++++++ xchem_db/migrations/__init__.py | 0 2 files changed, 653 insertions(+) create mode 100644 xchem_db/migrations/0001_initial.py create mode 100644 xchem_db/migrations/__init__.py diff --git a/xchem_db/migrations/0001_initial.py b/xchem_db/migrations/0001_initial.py new file mode 100644 index 00000000..b90b85b2 --- /dev/null +++ b/xchem_db/migrations/0001_initial.py @@ -0,0 +1,653 @@ +# Generated by Django 2.0.5 on 2020-11-27 16:10 + +import django.contrib.postgres.fields +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Compounds', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('smiles', models.CharField(blank=True, db_index=True, max_length=255, null=True, unique=True)), + ], + options={ + 'db_table': 'compounds', + }, + ), + migrations.CreateModel( + name='Crystal', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('crystal_name', models.CharField(db_index=True, max_length=255)), + ('product', models.CharField(blank=True, max_length=255, null=True)), + ('status', models.CharField(choices=[('PP', 'preprocessing'), ('PD', 'pandda'), ('RE', 'refinement'), ('CC', 'comp_chem'), ('DP', 'deposition')], default='PP', max_length=2)), + ('compound', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='xchem_db.Compounds')), + ], + options={ + 'db_table': 'crystal', + }, + ), + migrations.CreateModel( + name='DataProcessing', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('auto_assigned', models.TextField(blank=True, null=True)), + ('cchalf_high', models.FloatField(blank=True, null=True)), + ('cchalf_low', models.FloatField(blank=True, null=True)), + ('cchalf_overall', models.FloatField(blank=True, null=True)), + ('completeness_high', models.FloatField(blank=True, null=True)), + ('completeness_low', models.FloatField(blank=True, null=True)), + ('completeness_overall', models.FloatField(blank=True, null=True)), + ('dimple_mtz_path', models.TextField(blank=True, null=True)), + ('dimple_pdb_path', models.TextField(blank=True, null=True)), + ('dimple_status', models.TextField(blank=True, null=True)), + ('image_path', models.TextField(blank=True, null=True)), + ('isig_high', models.FloatField(blank=True, null=True)), + ('isig_low', models.FloatField(blank=True, null=True)), + ('isig_overall', models.FloatField(blank=True, null=True)), + ('lattice', models.TextField(blank=True, null=True)), + ('log_name', models.TextField(blank=True, null=True)), + ('logfile_path', models.TextField(blank=True, null=True)), + ('mtz_name', models.TextField(blank=True, null=True)), + ('mtz_path', models.TextField(blank=True, null=True)), + ('multiplicity_high', models.FloatField(blank=True, null=True)), + ('multiplicity_low', models.FloatField(blank=True, null=True)), + ('multiplicity_overall', models.FloatField(blank=True, null=True)), + ('original_directory', models.TextField(blank=True, null=True)), + ('point_group', models.TextField(blank=True, null=True)), + ('program', models.TextField(blank=True, null=True)), + ('r_cryst', models.FloatField(blank=True, null=True)), + ('r_free', models.FloatField(blank=True, null=True)), + ('r_merge_high', models.FloatField(blank=True, null=True)), + ('r_merge_low', models.FloatField(blank=True, null=True)), + ('r_merge_overall', models.FloatField(blank=True, null=True)), + ('res_high', models.FloatField(blank=True, null=True)), + ('res_high_15_sigma', models.FloatField(blank=True, null=True)), + ('res_high_outer_shell', models.FloatField(blank=True, null=True)), + ('res_low', models.FloatField(blank=True, null=True)), + ('res_low_inner_shell', models.FloatField(blank=True, null=True)), + ('res_overall', models.TextField(blank=True, null=True)), + ('score', models.FloatField(blank=True, null=True)), + ('spacegroup', models.TextField(blank=True, null=True)), + ('status', models.TextField(blank=True, null=True)), + ('unique_ref_overall', models.IntegerField(blank=True, null=True)), + ('unit_cell', models.TextField(blank=True, null=True)), + ('unit_cell_vol', models.FloatField(blank=True, null=True)), + ('crystal_name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xchem_db.Crystal', unique=True)), + ], + options={ + 'db_table': 'data_processing', + }, + ), + migrations.CreateModel( + name='Dimple', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('mtz_path', models.CharField(blank=True, max_length=255, null=True)), + ('pdb_path', models.CharField(blank=True, max_length=255, null=True)), + ('r_free', models.FloatField(blank=True, null=True)), + ('res_high', models.FloatField(blank=True, null=True)), + ('status', models.TextField(blank=True, null=True)), + ('crystal_name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xchem_db.Crystal', unique=True)), + ], + options={ + 'db_table': 'dimple', + }, + ), + migrations.CreateModel( + name='Lab', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('cryo_frac', models.FloatField(blank=True, null=True)), + ('cryo_status', models.TextField(blank=True, null=True)), + ('cryo_stock_frac', models.FloatField(blank=True, null=True)), + ('cryo_transfer_vol', models.FloatField(blank=True, null=True)), + ('data_collection_visit', models.TextField(blank=True, null=True)), + ('expr_conc', models.FloatField(blank=True, null=True)), + ('harvest_status', models.TextField(blank=True, null=True)), + ('library_name', models.TextField(blank=True, null=True)), + ('library_plate', models.TextField(blank=True, null=True)), + ('mounting_result', models.TextField(blank=True, null=True)), + ('mounting_time', models.TextField(blank=True, null=True)), + ('soak_status', models.TextField(blank=True, null=True)), + ('soak_time', models.TextField(blank=True, null=True)), + ('soak_vol', models.FloatField(blank=True, null=True)), + ('solv_frac', models.FloatField(blank=True, null=True)), + ('stock_conc', models.FloatField(blank=True, null=True)), + ('visit', models.TextField(blank=True, null=True)), + ('crystal_name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xchem_db.Crystal', unique=True)), + ], + options={ + 'db_table': 'lab', + }, + ), + migrations.CreateModel( + name='LigandEdstats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('baa', models.FloatField(blank=True, null=True)), + ('ccpa', models.FloatField(blank=True, null=True)), + ('ccsa', models.FloatField(blank=True, null=True)), + ('npa', models.FloatField(blank=True, null=True)), + ('rga', models.FloatField(blank=True, null=True)), + ('ra', models.FloatField(blank=True, null=True)), + ('srga', models.FloatField(blank=True, null=True)), + ('zccpa', models.FloatField(blank=True, null=True)), + ('zd_a', models.FloatField(blank=True, null=True)), + ('zd_a_0', models.FloatField(blank=True, null=True)), + ('zda', models.FloatField(blank=True, null=True)), + ('zoa', models.FloatField(blank=True, null=True)), + ('ligand', models.CharField(blank=True, max_length=255, null=True)), + ('crystal_name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xchem_db.Crystal')), + ], + options={ + 'db_table': 'ligand_edstats', + }, + ), + migrations.CreateModel( + name='Occupancy', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('refine_log', models.TextField(blank=True, null=True)), + ('all_occupancy', django.contrib.postgres.fields.ArrayField(base_field=models.FloatField(), size=None)), + ('occupancy', models.FloatField(blank=True, null=True)), + ('occupancy_group', models.IntegerField(blank=True, null=True)), + ('complete_group', models.TextField(blank=True, null=True)), + ('resid', models.IntegerField(blank=True, null=True)), + ('alte', models.CharField(blank=True, max_length=1, null=True)), + ('state', models.CharField(blank=True, max_length=7, null=True)), + ('resname', models.CharField(blank=True, max_length=3, null=True)), + ('comment', models.TextField(blank=True, null=True)), + ('edited', models.DateTimeField(auto_now=True)), + ('added', models.DateTimeField(auto_now_add=True)), + ], + ), + migrations.CreateModel( + name='PanddaAnalysis', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('pandda_dir', models.CharField(max_length=255, unique=True)), + ], + options={ + 'db_table': 'pandda_analysis', + }, + ), + migrations.CreateModel( + name='PanddaEvent', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('event', models.IntegerField(blank=True, db_index=True, null=True)), + ('event_centroid_x', models.FloatField(blank=True, null=True)), + ('event_centroid_y', models.FloatField(blank=True, null=True)), + ('event_centroid_z', models.FloatField(blank=True, null=True)), + ('event_dist_from_site_centroid', models.TextField(blank=True, null=True)), + ('lig_centroid_x', models.FloatField(blank=True, null=True)), + ('lig_centroid_y', models.FloatField(blank=True, null=True)), + ('lig_centroid_z', models.FloatField(blank=True, null=True)), + ('lig_dist_event', models.FloatField(blank=True, null=True)), + ('lig_id', models.TextField(blank=True, null=True)), + ('pandda_event_map_native', models.TextField(blank=True, null=True)), + ('pandda_event_map_cut', models.TextField(blank=True, null=True)), + ('pandda_model_pdb', models.TextField(blank=True, null=True)), + ('pandda_input_mtz', models.TextField(blank=True, null=True)), + ('pandda_input_pdb', models.TextField(blank=True, null=True)), + ('ligand_confidence_inspect', models.TextField(blank=True, null=True)), + ('ligand_confidence', models.TextField(blank=True, null=True)), + ('comment', models.TextField(blank=True, null=True)), + ('interesting', models.BooleanField()), + ('event_status', models.TextField(blank=True, null=True)), + ('created_date', models.DateTimeField(auto_now_add=True, null=True)), + ('modified_date', models.DateTimeField(auto_now=True, null=True)), + ('ligand_confidence_source', models.CharField(choices=[('NA', 'none'), ('SD', 'soak_db'), ('FS', 'fragspect')], default='NA', max_length=2)), + ('crystal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xchem_db.Crystal')), + ('data_proc', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xchem_db.DataProcessing')), + ], + options={ + 'db_table': 'pandda_event', + }, + ), + migrations.CreateModel( + name='PanddaEventStats', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('one_minus_bdc', models.FloatField(blank=True, null=True)), + ('cluster_size', models.IntegerField(blank=True, null=True)), + ('glob_corr_av_map', models.FloatField(blank=True, null=True)), + ('glob_corr_mean_map', models.FloatField(blank=True, null=True)), + ('loc_corr_av_map', models.FloatField(blank=True, null=True)), + ('loc_corr_mean_map', models.FloatField(blank=True, null=True)), + ('z_mean', models.FloatField(blank=True, null=True)), + ('z_peak', models.FloatField(blank=True, null=True)), + ('b_factor_scaled', models.FloatField(blank=True, null=True)), + ('high_res', models.FloatField(blank=True, null=True)), + ('low_res', models.FloatField(blank=True, null=True)), + ('r_free', models.FloatField(blank=True, null=True)), + ('r_work', models.FloatField(blank=True, null=True)), + ('ref_rmsd', models.FloatField(blank=True, null=True)), + ('wilson_scaled_b', models.FloatField(blank=True, null=True)), + ('wilson_scaled_ln_dev', models.FloatField(blank=True, null=True)), + ('wilson_scaled_ln_dev_z', models.FloatField(blank=True, null=True)), + ('wilson_scaled_ln_rmsd', models.FloatField(blank=True, null=True)), + ('wilson_scaled_ln_rmsd_z', models.FloatField(blank=True, null=True)), + ('wilson_scaled_below_four_rmsd', models.FloatField(blank=True, null=True)), + ('wilson_scaled_below_four_rmsd_z', models.FloatField(blank=True, null=True)), + ('wilson_scaled_above_four_rmsd', models.FloatField(blank=True, null=True)), + ('wilson_scaled_above_four_rmsd_z', models.FloatField(blank=True, null=True)), + ('wilson_scaled_rmsd_all', models.FloatField(blank=True, null=True)), + ('wilson_scaled_rmsd_all_z', models.FloatField(blank=True, null=True)), + ('wilson_unscaled', models.FloatField(blank=True, null=True)), + ('wilson_unscaled_ln_dev', models.FloatField(blank=True, null=True)), + ('wilson_unscaled_ln_dev_z', models.FloatField(blank=True, null=True)), + ('wilson_unscaled_ln_rmsd', models.FloatField(blank=True, null=True)), + ('wilson_unscaled_ln_rmsd_z', models.FloatField(blank=True, null=True)), + ('wilson_unscaled_below_four_rmsd', models.FloatField(blank=True, null=True)), + ('wilson_unscaled_below_four_rmsd_z', models.FloatField(blank=True, null=True)), + ('wilson_unscaled_above_four_rmsd', models.FloatField(blank=True, null=True)), + ('wilson_unscaled_above_four_rmsd_z', models.FloatField(blank=True, null=True)), + ('wilson_unscaled_rmsd_all', models.FloatField(blank=True, null=True)), + ('wilson_unscaled_rmsd_all_z', models.FloatField(blank=True, null=True)), + ('resolution', models.FloatField(blank=True, null=True)), + ('map_uncertainty', models.FloatField(blank=True, null=True)), + ('obs_map_mean', models.FloatField(blank=True, null=True)), + ('obs_map_rms', models.FloatField(blank=True, null=True)), + ('z_map_kurt', models.FloatField(blank=True, null=True)), + ('z_map_mean', models.FloatField(blank=True, null=True)), + ('z_map_skew', models.FloatField(blank=True, null=True)), + ('z_map_std', models.FloatField(blank=True, null=True)), + ('scl_map_mean', models.FloatField(blank=True, null=True)), + ('scl_map_rms', models.FloatField(blank=True, null=True)), + ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xchem_db.PanddaEvent')), + ], + options={ + 'db_table': 'pandda_event_stats', + }, + ), + migrations.CreateModel( + name='PanddaRun', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('input_dir', models.TextField(blank=True, null=True)), + ('pandda_log', models.CharField(max_length=255, unique=True)), + ('pandda_version', models.TextField(blank=True, null=True)), + ('sites_file', models.TextField(blank=True, null=True)), + ('events_file', models.TextField(blank=True, null=True)), + ('pandda_analysis', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xchem_db.PanddaAnalysis')), + ], + options={ + 'db_table': 'pandda_run', + }, + ), + migrations.CreateModel( + name='PanddaSite', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('site', models.IntegerField(blank=True, db_index=True, null=True)), + ('site_aligned_centroid_x', models.FloatField(blank=True, null=True)), + ('site_aligned_centroid_y', models.FloatField(blank=True, null=True)), + ('site_aligned_centroid_z', models.FloatField(blank=True, null=True)), + ('site_native_centroid_x', models.FloatField(blank=True, null=True)), + ('site_native_centroid_y', models.FloatField(blank=True, null=True)), + ('site_native_centroid_z', models.FloatField(blank=True, null=True)), + ('pandda_run', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xchem_db.PanddaRun')), + ], + options={ + 'db_table': 'pandda_site', + }, + ), + migrations.CreateModel( + name='PanddaStatisticalMap', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('resolution_from', models.FloatField(blank=True, null=True)), + ('resolution_to', models.FloatField(blank=True, null=True)), + ('dataset_list', models.TextField()), + ('pandda_run', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xchem_db.PanddaRun')), + ], + options={ + 'db_table': 'pandda_statistical_map', + }, + ), + migrations.CreateModel( + name='ProasisHits', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('pdb_file', models.TextField()), + ('modification_date', models.TextField(blank=True, null=True)), + ('strucid', models.TextField(blank=True, null=True)), + ('ligand_list', models.TextField(blank=True, null=True)), + ('mtz', models.TextField()), + ('two_fofc', models.TextField()), + ('fofc', models.TextField()), + ('sdf', models.TextField(blank=True, null=True)), + ('altconf', models.CharField(blank=True, max_length=255, null=True)), + ('added', models.DateTimeField(auto_now_add=True)), + ('crystal_name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xchem_db.Crystal')), + ], + options={ + 'db_table': 'proasis_hits', + }, + ), + migrations.CreateModel( + name='ProasisLeads', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('strucid', models.CharField(blank=True, max_length=255, null=True, unique=True)), + ], + options={ + 'db_table': 'proasis_leads', + }, + ), + migrations.CreateModel( + name='ProasisOut', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('ligand', models.CharField(max_length=255)), + ('ligid', models.IntegerField(blank=True, null=True)), + ('root', models.TextField(blank=True, null=True)), + ('start', models.TextField(blank=True, null=True)), + ('curated', models.TextField(blank=True, null=True)), + ('sdf', models.TextField(blank=True, null=True)), + ('apo', models.TextField(blank=True, null=True)), + ('mol', models.TextField(blank=True, null=True)), + ('mol2', models.TextField(blank=True, null=True)), + ('h_mol', models.TextField(blank=True, null=True)), + ('stripped', models.TextField(blank=True, null=True)), + ('event', models.TextField(blank=True, null=True)), + ('mtz', models.TextField(blank=True, null=True)), + ('contacts', models.TextField(blank=True, null=True)), + ('acc', models.TextField(blank=True, null=True)), + ('don', models.TextField(blank=True, null=True)), + ('lip', models.TextField(blank=True, null=True)), + ('pmap', models.TextField(blank=True, null=True)), + ('ppdb', models.TextField(blank=True, null=True)), + ('pjson', models.TextField(blank=True, null=True)), + ('pmtz', models.TextField(blank=True, null=True)), + ('added', models.DateTimeField(auto_now_add=True)), + ('crystal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xchem_db.Crystal')), + ('proasis', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xchem_db.ProasisHits')), + ], + options={ + 'db_table': 'proasis_out', + }, + ), + migrations.CreateModel( + name='ProasisPandda', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('event_map_native', models.TextField()), + ('model_pdb', models.TextField()), + ('crystal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xchem_db.Crystal')), + ('event', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xchem_db.PanddaEvent')), + ('hit', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xchem_db.ProasisHits')), + ], + options={ + 'db_table': 'proasis_pandda', + }, + ), + migrations.CreateModel( + name='Proposals', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('proposal', models.CharField(db_index=True, max_length=255, unique=True)), + ('title', models.CharField(blank=True, max_length=10, null=True)), + ('fedids', models.TextField(blank=True, null=True)), + ], + options={ + 'db_table': 'proposals', + }, + ), + migrations.CreateModel( + name='Reference', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('reference_pdb', models.CharField(default='not_assigned', max_length=255, null=True, unique=True)), + ], + options={ + 'db_table': 'reference', + }, + ), + migrations.CreateModel( + name='Refinement', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('bound_conf', models.CharField(blank=True, max_length=255, null=True, unique=True)), + ('cif', models.TextField(blank=True, null=True)), + ('cif_prog', models.TextField(blank=True, null=True)), + ('cif_status', models.TextField(blank=True, null=True)), + ('lig_bound_conf', models.TextField(blank=True, null=True)), + ('lig_cc', models.TextField(blank=True, null=True)), + ('lig_confidence', models.TextField(blank=True, null=True)), + ('lig_confidence_int', models.IntegerField(blank=True, null=True)), + ('lig_confidence_string', models.TextField(blank=True, null=True)), + ('matrix_weight', models.TextField(blank=True, null=True)), + ('molprobity_score', models.FloatField(blank=True, null=True)), + ('mtz_free', models.TextField(blank=True, null=True)), + ('mtz_latest', models.TextField(blank=True, null=True)), + ('outcome', models.IntegerField(blank=True, null=True)), + ('pdb_latest', models.TextField(blank=True, null=True)), + ('r_free', models.FloatField(blank=True, null=True)), + ('ramachandran_favoured', models.TextField(blank=True, null=True)), + ('ramachandran_outliers', models.TextField(blank=True, null=True)), + ('rcryst', models.FloatField(blank=True, null=True)), + ('refinement_path', models.TextField(blank=True, null=True)), + ('res', models.FloatField(blank=True, null=True)), + ('rmsd_angles', models.TextField(blank=True, null=True)), + ('rmsd_bonds', models.TextField(blank=True, null=True)), + ('spacegroup', models.TextField(blank=True, null=True)), + ('status', models.TextField(blank=True, null=True)), + ], + options={ + 'db_table': 'refinement', + }, + ), + migrations.CreateModel( + name='ReviewResponses', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('fedid', models.TextField()), + ('decision_int', models.IntegerField()), + ('decision_str', models.TextField()), + ('reason', models.TextField()), + ('time_submitted', models.IntegerField()), + ('crystal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xchem_db.Crystal')), + ], + options={ + 'db_table': 'review_responses', + }, + ), + migrations.CreateModel( + name='SoakdbFiles', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('filename', models.CharField(max_length=255, unique=True)), + ('modification_date', models.BigIntegerField()), + ('visit', models.TextField()), + ('status', models.IntegerField(blank=True, null=True)), + ('proposal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xchem_db.Proposals')), + ], + options={ + 'db_table': 'soakdb_files', + }, + ), + migrations.CreateModel( + name='Target', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('target_name', models.CharField(db_index=True, max_length=255, unique=True)), + ], + options={ + 'db_table': 'target', + }, + ), + migrations.CreateModel( + name='Tasks', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('task_name', models.CharField(db_index=True, max_length=255)), + ('uuid', models.CharField(db_index=True, max_length=37, unique=True)), + ], + options={ + 'db_table': 'tasks', + }, + ), + migrations.CreateModel( + name='ConvergenceOccupancy', + fields=[ + ('occupancy_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='xchem_db.Occupancy')), + ], + bases=('xchem_db.occupancy',), + ), + migrations.CreateModel( + name='ConvergenceRefinement', + fields=[ + ('refinement_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='xchem_db.Refinement')), + ('success', models.NullBooleanField()), + ('cycles', models.IntegerField(blank=True, null=True)), + ('error', models.TextField(blank=True, null=True)), + ], + bases=('xchem_db.refinement',), + ), + migrations.CreateModel( + name='NonSuperposedOccupancy', + fields=[ + ('occupancy_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='xchem_db.Occupancy')), + ], + bases=('xchem_db.occupancy',), + ), + migrations.CreateModel( + name='NonSuperposedRefinement', + fields=[ + ('refinement_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='xchem_db.Refinement')), + ], + bases=('xchem_db.refinement',), + ), + migrations.AlterUniqueTogether( + name='tasks', + unique_together={('task_name', 'uuid')}, + ), + migrations.AddField( + model_name='refinement', + name='crystal_name', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xchem_db.Crystal', unique=True), + ), + migrations.AddField( + model_name='proasisleads', + name='reference_pdb', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xchem_db.Reference', to_field='reference_pdb', unique=True), + ), + migrations.AddField( + model_name='proasishits', + name='refinement', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xchem_db.Refinement'), + ), + migrations.AddField( + model_name='panddaevent', + name='pandda_run', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xchem_db.PanddaRun'), + ), + migrations.AddField( + model_name='panddaevent', + name='refinement', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xchem_db.Refinement'), + ), + migrations.AddField( + model_name='panddaevent', + name='site', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xchem_db.PanddaSite'), + ), + migrations.AddField( + model_name='occupancy', + name='crystal', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xchem_db.Crystal'), + ), + migrations.AddField( + model_name='occupancy', + name='refinement', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xchem_db.Refinement'), + ), + migrations.AddField( + model_name='ligandedstats', + name='strucid', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xchem_db.ProasisHits'), + ), + migrations.AddField( + model_name='dimple', + name='reference', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='xchem_db.Reference'), + ), + migrations.AddField( + model_name='crystal', + name='target', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xchem_db.Target'), + ), + migrations.AddField( + model_name='crystal', + name='visit', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='xchem_db.SoakdbFiles'), + ), + migrations.AlterUniqueTogether( + name='proasispandda', + unique_together={('crystal', 'hit', 'event')}, + ), + migrations.AlterUniqueTogether( + name='proasisout', + unique_together={('crystal', 'proasis', 'ligand', 'ligid')}, + ), + migrations.AlterUniqueTogether( + name='proasishits', + unique_together={('refinement', 'crystal_name', 'altconf')}, + ), + migrations.AlterUniqueTogether( + name='panddastatisticalmap', + unique_together={('resolution_from', 'resolution_to', 'pandda_run')}, + ), + migrations.AlterUniqueTogether( + name='panddasite', + unique_together={('pandda_run', 'site')}, + ), + migrations.AlterUniqueTogether( + name='panddaevent', + unique_together={('site', 'event', 'crystal', 'pandda_run')}, + ), + migrations.AddField( + model_name='nonsuperposedrefinement', + name='orignal_refinement', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='xchem_db.Refinement'), + ), + migrations.AddField( + model_name='nonsuperposedoccupancy', + name='nonsuper_refinement', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='xchem_db.NonSuperposedRefinement'), + ), + migrations.AlterUniqueTogether( + name='ligandedstats', + unique_together={('crystal_name', 'ligand', 'strucid')}, + ), + migrations.AlterUniqueTogether( + name='dimple', + unique_together={('pdb_path', 'mtz_path')}, + ), + migrations.AlterUniqueTogether( + name='crystal', + unique_together={('crystal_name', 'visit', 'compound', 'product')}, + ), + migrations.AddField( + model_name='convergencerefinement', + name='orignal_refinement', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='xchem_db.Refinement'), + ), + migrations.AddField( + model_name='convergenceoccupancy', + name='convergence_refinement', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='xchem_db.ConvergenceRefinement'), + ), + ] diff --git a/xchem_db/migrations/__init__.py b/xchem_db/migrations/__init__.py new file mode 100644 index 00000000..e69de29b