Skip to content

Commit

Permalink
ensure base container built with migrations (#3)
Browse files Browse the repository at this point in the history
Signed-off-by: vsoch <vsoch@users.noreply.github.com>

Signed-off-by: vsoch <vsoch@users.noreply.github.com>
Co-authored-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch and vsoch committed Aug 15, 2022
1 parent 433b92b commit d330409
Show file tree
Hide file tree
Showing 4 changed files with 137 additions and 0 deletions.
72 changes: 72 additions & 0 deletions tuneldjango/apps/main/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Generated by Django 4.1 on 2022-08-04 22:44

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

initial = True

dependencies = [
('users', '__first__'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]

operations = [
migrations.CreateModel(
name='FormTemplate',
fields=[
('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('time_created', models.DateTimeField(auto_now_add=True, verbose_name='date created')),
('time_updated', models.DateTimeField(auto_now=True, help_text='Template Updated or completed at.', verbose_name='date modified')),
('start_date', models.DateTimeField(verbose_name='project start date')),
('end_date', models.DateTimeField(verbose_name='project end date')),
('name', models.TextField(help_text='Evidence-Based Intervention/Program/Service Being Implemented (WHAT)')),
('target_audience_disciplines', models.TextField(help_text='Specify target audience')),
('target_audience_roles', models.TextField(help_text='Specify role(s)')),
('target_audience_across_orgs', models.BooleanField(default=False, help_text='Multiple individuals across organizations')),
('target_audience_within_org', models.BooleanField(default=False, help_text='Multiple individuals within an organization')),
('target_audience_teams_across_orgs', models.BooleanField(default=False, help_text='Multiple individuals or teams across organizations')),
('implement_strategy_description', models.TextField(help_text='Free Text Description (Provide a Description of the Planned Implementation Steps)')),
('consider_system_factors', models.TextField(help_text='System factors--external to the organization (e.g., financing; mandates, community, culture)')),
('consider_org_factors', models.TextField(help_text='Organizational factors—internal to the organization (e.g., leadership; readiness)')),
('consider_clinical_factors', models.TextField(help_text='Individual clinician factors (e.g., alignment with existing practice; complexity)')),
('consider_sustainment_strategy', models.TextField(blank=True, help_text='Sustainment strategies applied', null=True)),
('implementation_recruited', models.TextField(help_text='How will participants be recruited?')),
('implementation_participants', models.PositiveIntegerField(blank=True, help_text='How many participants are enrolled?', null=True)),
('implementation_enrolled', models.PositiveIntegerField(blank=True, help_text='# (%) initiating implementation strategy (individuals, teams or organizations)', null=True)),
('outcome_reach', models.TextField(help_text='Reach (# or percentage of population, what is the population, and how will you be measuring the outcome?')),
('outcome_effectiveness', models.TextField(help_text='Effectiveness of Intervention/Program/Services (w/consumers), how will you measure it?')),
('outcome_adoption', models.TextField(help_text='Number of providers? How will you be measuring it?')),
('outcome_quality', models.TextField(help_text='Implementation Fidelity/Adherence/Quality. How will you be measuring it?')),
('outcome_cost', models.TextField(help_text='Cost. How will you keep track of it?')),
('outcome_maintenance', models.TextField(help_text='Maintenance/Sustainment.')),
('outcome_other', models.TextField(help_text='Any other measures being planned?')),
('implementation_completing_half', models.PositiveIntegerField(blank=True, help_text='# (%) completing 50% of implementation strategy activities', null=True)),
('implementation_completing_majority', models.PositiveIntegerField(blank=True, help_text='# (%) completing 80% or more of implementation strategy activities', null=True)),
('results_reach', models.TextField(blank=True, help_text='Reach (# or percentage of population, what is the population, and how will you be measuring the outcome?', null=True)),
('results_effectiveness', models.TextField(blank=True, help_text='Effectiveness of Intervention/Program/Services (w/consumers), how will you measure it?', null=True)),
('results_adoption', models.TextField(blank=True, help_text='Results available for number of providers?', null=True)),
('results_quality', models.TextField(blank=True, help_text='Results available for implementation Fidelity/Adherence/Quality?', null=True)),
('results_cost', models.TextField(blank=True, help_text='Results available for cost?', null=True)),
('results_maintenance', models.TextField(blank=True, help_text='Results for Maintenance/Sustainment.', null=True)),
('results_other', models.TextField(blank=True, help_text='Results available for other?', null=True)),
],
),
migrations.CreateModel(
name='Project',
fields=[
('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
('time_created', models.DateTimeField(auto_now_add=True, verbose_name='date created')),
('time_updated', models.DateTimeField(auto_now=True, verbose_name='date modified')),
('name', models.CharField(max_length=250)),
('description', models.CharField(blank=True, max_length=500, null=True)),
('contact', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
('form', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='main.formtemplate')),
('group', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='users.group')),
],
),
]
Empty file.
65 changes: 65 additions & 0 deletions tuneldjango/apps/users/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Generated by Django 4.1 on 2022-08-04 22:44

from django.conf import settings
import django.contrib.auth.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import uuid


class Migration(migrations.Migration):

initial = True

dependencies = [
('auth', '0012_alter_user_first_name_max_length'),
]

operations = [
migrations.CreateModel(
name='User',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('password', models.CharField(max_length=128, verbose_name='password')),
('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')),
('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
('active', models.BooleanField(default=True)),
('uuid', models.UUIDField(default=uuid.uuid4)),
('agree_terms', models.BooleanField(default=False)),
('agree_terms_date', models.DateTimeField(blank=True, default=None, null=True)),
],
),
migrations.CreateModel(
name='Group',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(default=None, max_length=50, unique=True)),
('created_at', models.DateTimeField(auto_now_add=True, verbose_name='date of creation')),
('updated_at', models.DateTimeField(auto_now=True, verbose_name='date of last update')),
('owners', models.ManyToManyField(blank=True, default=None, help_text='Administrators of the group.', related_name='group_owners', related_query_name='group_owners', to=settings.AUTH_USER_MODEL)),
],
),
migrations.AddField(
model_name='user',
name='group',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='users.group'),
),
migrations.AddField(
model_name='user',
name='groups',
field=models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.group', verbose_name='groups'),
),
migrations.AddField(
model_name='user',
name='user_permissions',
field=models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.permission', verbose_name='user permissions'),
),
]
Empty file.

0 comments on commit d330409

Please sign in to comment.