diff --git a/app/auth/__init__.py b/app/auth/__init__.py
deleted file mode 100644
index 84c30c6..0000000
--- a/app/auth/__init__.py
+++ /dev/null
@@ -1,8 +0,0 @@
-# app/auth/__init__.py
-from flask import Blueprint
-
-# Define the auth blueprint
-bp = Blueprint('auth', __name__, template_folder='templates')
-
-# Import routes at the bottom
-from app.auth import routes
\ No newline at end of file
diff --git a/app/auth/forms.py b/app/auth/forms.py
deleted file mode 100644
index ae89c0b..0000000
--- a/app/auth/forms.py
+++ /dev/null
@@ -1,13 +0,0 @@
-# app/auth/forms.py
-from flask_wtf import FlaskForm
-from wtforms import StringField, PasswordField, BooleanField, SubmitField
-from wtforms.validators import DataRequired
-
-# Moved from control_panel forms
-class LoginForm(FlaskForm):
- username = StringField('Username', validators=[DataRequired()])
- password = PasswordField('Password', validators=[DataRequired()])
- remember_me = BooleanField('Remember Me')
- submit = SubmitField('Sign In')
-
-# Add RegistrationForm, ResetPasswordRequestForm etc. here later
\ No newline at end of file
diff --git a/app/auth/routes.py b/app/auth/routes.py
deleted file mode 100644
index 06ca0af..0000000
--- a/app/auth/routes.py
+++ /dev/null
@@ -1,59 +0,0 @@
-# app/auth/routes.py
-from flask import render_template, flash, redirect, url_for, request
-from flask_login import current_user, login_user, logout_user # Keep current_user for checking auth status
-from app import db
-from app.models import User
-from app.auth import bp # Import the auth blueprint
-from .forms import LoginForm # Import LoginForm from within auth blueprint
-
-@bp.route('/login', methods=['GET', 'POST'])
-def login():
- if current_user.is_authenticated:
- # Redirect authenticated users away from login page
- # Maybe check role here too? Or just send to core index.
- if current_user.role == 'admin':
- return redirect(url_for('control_panel.index'))
- else:
- return redirect(url_for('core.index'))
-
- form = LoginForm()
- if form.validate_on_submit():
- user = User.query.filter_by(username=form.username.data).first()
- if user is None or not user.check_password(form.password.data):
- flash('Invalid username or password', 'danger')
- return redirect(url_for('auth.login'))
-
- # Log the user in
- login_user(user, remember=form.remember_me.data)
- flash(f'Welcome back, {user.username}!', 'success')
-
- # --- Redirect Logic Modified ---
- next_page = request.args.get('next')
-
- # IMPORTANT: Validate next_page to prevent Open Redirect attacks
- # Ensure it's a relative path within our site
- if next_page and not next_page.startswith('/'):
- flash('Invalid redirect specified.', 'warning') # Optional feedback
- next_page = None # Discard invalid or external URLs
-
- # If no valid 'next' page was provided, determine default based on role
- if not next_page:
- if user.role == 'admin':
- # Default redirect for admins
- next_page = url_for('control_panel.index')
- else:
- # Default redirect for non-admins (e.g., 'user' role)
- next_page = url_for('core.index')
- # --- End of Modified Redirect Logic ---
-
- return redirect(next_page)
-
- # Render login template (GET request or failed POST validation)
- # Assuming template is directly in blueprint's template folder
- return render_template('login.html', title='Sign In', form=form)
-
-@bp.route('/logout')
-def logout():
- logout_user()
- flash('You have been logged out.', 'info')
- return redirect(url_for('core.index'))
\ No newline at end of file
diff --git a/app/auth/templates/login.html b/app/auth/templates/login.html
deleted file mode 100644
index 799c20c..0000000
--- a/app/auth/templates/login.html
+++ /dev/null
@@ -1,43 +0,0 @@
-{% extends "base.html" %}
-
-{% block content %}
-
-{% endblock %}
\ No newline at end of file
diff --git a/app/models.py b/app/models.py
index 0e80644..023b1b9 100644
--- a/app/models.py
+++ b/app/models.py
@@ -5,47 +5,6 @@ from werkzeug.security import generate_password_hash, check_password_hash
from datetime import datetime
import json
-class User(UserMixin, db.Model):
- id = db.Column(db.Integer, primary_key=True)
- username = db.Column(db.String(64), index=True, unique=True)
- email = db.Column(db.String(120), index=True, unique=True)
- password_hash = db.Column(db.String(256))
- # --- ADDED ROLE COLUMN ---
- role = db.Column(db.String(20), index=True, default='user', nullable=False)
-
- # Optional: Add a helper property for easy checking
- @property
- def is_admin(self):
- return self.role == 'admin'
- # --- END ROLE COLUMN ---
-
- def __repr__(self):
- # You might want to include the role in the representation
- return f''
-
- def set_password(self, password):
- self.password_hash = generate_password_hash(password)
-
- def check_password(self, password):
- # Ensure password_hash is not None before checking
- if self.password_hash is None:
- return False
- return check_password_hash(self.password_hash, password)
-
-# Add this new model
-class ModuleRegistry(db.Model):
- id = db.Column(db.Integer, primary_key=True)
- module_id = db.Column(db.String(100), unique=True, nullable=False, index=True) # Matches folder name
- is_enabled = db.Column(db.Boolean, default=False, nullable=False)
- display_name = db.Column(db.String(100), nullable=True) # Optional override from metadata
- description = db.Column(db.Text, nullable=True) # Optional override from metadata
- version = db.Column(db.String(30), nullable=True) # Store version discovered
- # Add timestamp for when it was first discovered or last updated?
- # last_seen = db.Column(db.DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)
-
- def __repr__(self):
- return f""
-
# --- ProcessedIg Model (MODIFIED for Examples) ---
class ProcessedIg(db.Model):
id = db.Column(db.Integer, primary_key=True)
diff --git a/app/templates/cp_downloaded_igs.html b/app/templates/downloaded_igs.html
similarity index 98%
rename from app/templates/cp_downloaded_igs.html
rename to app/templates/downloaded_igs.html
index 588b3a3..49f8207 100644
--- a/app/templates/cp_downloaded_igs.html
+++ b/app/templates/downloaded_igs.html
@@ -1,135 +1,135 @@
-{# app/control_panel/templates/cp_downloaded_igs.html #}
-{% extends "base.html" %}
-
-{% block content %}
-
-
-
Manage FHIR Packages
-
-
-
- {% if error_message %}
-
-
Error
- {{ error_message }}
-
- {% endif %}
-
- {# NOTE: The block calculating processed_ids set using {% set %} was REMOVED from here #}
-
- {# --- Start Two Column Layout --- #}
-
-
- {# --- Left Column: Downloaded Packages (Horizontal Buttons) --- #}
-
-
-
-
- {% if packages %}
-
-
-
- Risk: = Duplicate Dependancy with different versions
- Package Name Version Actions
-
-
- {% for pkg in packages %}
- {% set is_processed = (pkg.name, pkg.version) in processed_ids %}
- {# --- ADDED: Check for duplicate name --- #}
- {% set is_duplicate = pkg.name in duplicate_names %}
- {# --- ADDED: Assign row class based on duplicate group --- #}
-
-
- {# --- ADDED: Risk Badge for duplicates --- #}
- {% if is_duplicate %}
- Duplicate
- {% endif %}
- {# --- End Add --- #}
- {{ pkg.name }}
-
- {{ pkg.version }}
- {# Actions #}
-
- {% if is_processed %}
- Processed
- {% else %}
-
- {% endif %}
-
-
-
-
- {% endfor %}
-
-
-
- {% elif not error_message %}
No downloaded FHIR packages found.
{% endif %}
-
-
-
{# --- End Left Column --- #}
-
-
- {# --- Right Column: Processed Packages (Vertical Buttons) --- #}
-
-
-
-
- {% if processed_list %}
-
MS = Contains Must Support Elements
-
-
-
- Package Name Version Resource Types Actions
-
-
- {% for processed_ig in processed_list %}
-
- {# Tooltip for Processed At / Status #}
- {% set tooltip_title_parts = [] %}
- {% if processed_ig.processed_at %}{% set _ = tooltip_title_parts.append("Processed: " + processed_ig.processed_at.strftime('%Y-%m-%d %H:%M')) %}{% endif %}
- {% if processed_ig.status %}{% set _ = tooltip_title_parts.append("Status: " + processed_ig.status) %}{% endif %}
- {% set tooltip_text = tooltip_title_parts | join('\n') %}
- {{ processed_ig.package_name }}
-
- {{ processed_ig.package_version }}
- {# Resource Types Cell w/ Badges #}
- {% set types_info = processed_ig.resource_types_info %}
- {% if types_info %}{% for type_info in types_info %}{% if type_info.must_support %}{{ type_info.name }} {% else %}{{ type_info.name }} {% endif %}{% endfor %}
{% else %}N/A {% endif %}
-
-
- {# Vertical Button Group #}
-
-
-
- {% endfor %}
-
-
-
- {% elif not error_message %}
No packages recorded as processed yet.
{% endif %}
-
-
-
{# --- End Right Column --- #}
-
-
{# --- End Row --- #}
-
-
{# End container #}
-{% endblock %}
-
-{# Tooltip JS Initializer should be in base.html #}
+{# app/control_panel/templates/cp_downloaded_igs.html #}
+{% extends "base.html" %}
+
+{% block content %}
+
+
+
Manage FHIR Packages
+
+
+
+ {% if error_message %}
+
+
Error
+ {{ error_message }}
+
+ {% endif %}
+
+ {# NOTE: The block calculating processed_ids set using {% set %} was REMOVED from here #}
+
+ {# --- Start Two Column Layout --- #}
+
+
+ {# --- Left Column: Downloaded Packages (Horizontal Buttons) --- #}
+
+
+
+
+ {% if packages %}
+
+
+
+ Risk: = Duplicate Dependancy with different versions
+ Package Name Version Actions
+
+
+ {% for pkg in packages %}
+ {% set is_processed = (pkg.name, pkg.version) in processed_ids %}
+ {# --- ADDED: Check for duplicate name --- #}
+ {% set is_duplicate = pkg.name in duplicate_names %}
+ {# --- ADDED: Assign row class based on duplicate group --- #}
+
+
+ {# --- ADDED: Risk Badge for duplicates --- #}
+ {% if is_duplicate %}
+ Duplicate
+ {% endif %}
+ {# --- End Add --- #}
+ {{ pkg.name }}
+
+ {{ pkg.version }}
+ {# Actions #}
+
+ {% if is_processed %}
+ Processed
+ {% else %}
+
+ {% endif %}
+
+
+
+
+ {% endfor %}
+
+
+
+ {% elif not error_message %}
No downloaded FHIR packages found.
{% endif %}
+
+
+
{# --- End Left Column --- #}
+
+
+ {# --- Right Column: Processed Packages (Vertical Buttons) --- #}
+
+
+
+
+ {% if processed_list %}
+
MS = Contains Must Support Elements
+
+
+
+ Package Name Version Resource Types Actions
+
+
+ {% for processed_ig in processed_list %}
+
+ {# Tooltip for Processed At / Status #}
+ {% set tooltip_title_parts = [] %}
+ {% if processed_ig.processed_at %}{% set _ = tooltip_title_parts.append("Processed: " + processed_ig.processed_at.strftime('%Y-%m-%d %H:%M')) %}{% endif %}
+ {% if processed_ig.status %}{% set _ = tooltip_title_parts.append("Status: " + processed_ig.status) %}{% endif %}
+ {% set tooltip_text = tooltip_title_parts | join('\n') %}
+ {{ processed_ig.package_name }}
+
+ {{ processed_ig.package_version }}
+ {# Resource Types Cell w/ Badges #}
+ {% set types_info = processed_ig.resource_types_info %}
+ {% if types_info %}{% for type_info in types_info %}{% if type_info.must_support %}{{ type_info.name }} {% else %}{{ type_info.name }} {% endif %}{% endfor %}
{% else %}N/A {% endif %}
+
+
+ {# Vertical Button Group #}
+
+
+
+ {% endfor %}
+
+
+
+ {% elif not error_message %}
No packages recorded as processed yet.
{% endif %}
+
+
+
{# --- End Right Column --- #}
+
+
{# --- End Row --- #}
+
+
{# End container #}
+{% endblock %}
+
+{# Tooltip JS Initializer should be in base.html #}
{% block scripts %}{{ super() }}{% endblock %}
\ No newline at end of file
diff --git a/app/templates/cp_view_processed_ig.html b/app/templates/view_processed_ig.html
similarity index 98%
rename from app/templates/cp_view_processed_ig.html
rename to app/templates/view_processed_ig.html
index b61a324..e8cf5f9 100644
--- a/app/templates/cp_view_processed_ig.html
+++ b/app/templates/view_processed_ig.html
@@ -1,405 +1,405 @@
-{% extends "base.html" %}
-
-{% from "_form_helpers.html" import render_field %}
-
-{% block content %}
-
-
-
- {% if processed_ig %}
-
-
-
-
- Package Name
- {{ processed_ig.package_name }}
- Package Version
- {{ processed_ig.package_version }}
- Processed At
- {{ processed_ig.processed_at.strftime('%Y-%m-%d %H:%M:%S UTC') if processed_ig.processed_at else 'N/A' }}
- Processing Status
-
- {{ processed_ig.status or 'N/A' }}
-
-
-
-
-
-
-
-
- {% if profile_list or base_list %}
-
MS = Contains Must Support Elements
- {% if profile_list %}
-
Profiles Defined ({{ profile_list|length }}):
-
- {% endif %}
- {% if base_list %}
-
Examples = - Examples will be displayed when selecting Base Types if contained in the IG
-
Base Resource Types Referenced ({{ base_list|length }}):
-
- {% endif %}
- {% else %}
-
No resource type information extracted or stored.
- {% endif %}
-
-
-
-
-
-
-
-
-
-
-
-
- Select Example:
- -- Select --
-
-
-
-
-
-
-
-
Pretty-Printed JSON
-
-
-
-
-
-
-
-
- {% else %}
-
Processed IG details not available.
- {% endif %}
-
-
-{% block scripts %}
-{{ super() }}
-
-
-{% endblock scripts %}
+{% extends "base.html" %}
+
+{% from "_form_helpers.html" import render_field %}
+
+{% block content %}
+
+
+
+ {% if processed_ig %}
+
+
+
+
+ Package Name
+ {{ processed_ig.package_name }}
+ Package Version
+ {{ processed_ig.package_version }}
+ Processed At
+ {{ processed_ig.processed_at.strftime('%Y-%m-%d %H:%M:%S UTC') if processed_ig.processed_at else 'N/A' }}
+ Processing Status
+
+ {{ processed_ig.status or 'N/A' }}
+
+
+
+
+
+
+
+
+ {% if profile_list or base_list %}
+
MS = Contains Must Support Elements
+ {% if profile_list %}
+
Profiles Defined ({{ profile_list|length }}):
+
+ {% endif %}
+ {% if base_list %}
+
Examples = - Examples will be displayed when selecting Base Types if contained in the IG
+
Base Resource Types Referenced ({{ base_list|length }}):
+
+ {% endif %}
+ {% else %}
+
No resource type information extracted or stored.
+ {% endif %}
+
+
+
+
+
+
+
+
+
+
+
+
+ Select Example:
+ -- Select --
+
+
+
+
+
+
+
+
Pretty-Printed JSON
+
+
+
+
+
+
+
+
+ {% else %}
+
Processed IG details not available.
+ {% endif %}
+
+
+{% block scripts %}
+{{ super() }}
+
+
+{% endblock scripts %}
{% endblock content %} {# Main content block END #}
\ No newline at end of file
diff --git a/migrations/README b/migrations/README
deleted file mode 100644
index bc8f3dd..0000000
--- a/migrations/README
+++ /dev/null
@@ -1 +0,0 @@
-Single-database configuration for Flask.
diff --git a/migrations/alembic.ini b/migrations/alembic.ini
deleted file mode 100644
index e7c72d1..0000000
--- a/migrations/alembic.ini
+++ /dev/null
@@ -1,50 +0,0 @@
-# A generic, single database configuration.
-
-[alembic]
-# template used to generate migration files
-# file_template = %%(rev)s_%%(slug)s
-
-# set to 'true' to run the environment during
-# the 'revision' command, regardless of autogenerate
-# revision_environment = false
-
-
-# Logging configuration
-[loggers]
-keys = root,sqlalchemy,alembic,flask_migrate
-
-[handlers]
-keys = console
-
-[formatters]
-keys = generic
-
-[logger_root]
-level = WARN
-handlers = console
-qualname =
-
-[logger_sqlalchemy]
-level = WARN
-handlers =
-qualname = sqlalchemy.engine
-
-[logger_alembic]
-level = INFO
-handlers =
-qualname = alembic
-
-[logger_flask_migrate]
-level = INFO
-handlers =
-qualname = flask_migrate
-
-[handler_console]
-class = StreamHandler
-args = (sys.stderr,)
-level = NOTSET
-formatter = generic
-
-[formatter_generic]
-format = %(levelname)-5.5s [%(name)s] %(message)s
-datefmt = %H:%M:%S
diff --git a/migrations/env.py b/migrations/env.py
deleted file mode 100644
index 2e4a5fa..0000000
--- a/migrations/env.py
+++ /dev/null
@@ -1,113 +0,0 @@
-import logging
-from logging.config import fileConfig
-
-from flask import current_app
-
-from alembic import context
-
-# this is the Alembic Config object, which provides
-# access to the values within the .ini file in use.
-config = context.config
-
-# Interpret the config file for Python logging.
-# This line sets up loggers basically.
-fileConfig(config.config_file_name)
-logger = logging.getLogger('alembic.env')
-
-
-def get_engine():
- try:
- # this works with Flask-SQLAlchemy<3 and Alchemical
- return current_app.extensions['migrate'].db.get_engine()
- except (TypeError, AttributeError):
- # this works with Flask-SQLAlchemy>=3
- return current_app.extensions['migrate'].db.engine
-
-
-def get_engine_url():
- try:
- return get_engine().url.render_as_string(hide_password=False).replace(
- '%', '%%')
- except AttributeError:
- return str(get_engine().url).replace('%', '%%')
-
-
-# add your model's MetaData object here
-# for 'autogenerate' support
-# from myapp import mymodel
-# target_metadata = mymodel.Base.metadata
-config.set_main_option('sqlalchemy.url', get_engine_url())
-target_db = current_app.extensions['migrate'].db
-
-# other values from the config, defined by the needs of env.py,
-# can be acquired:
-# my_important_option = config.get_main_option("my_important_option")
-# ... etc.
-
-
-def get_metadata():
- if hasattr(target_db, 'metadatas'):
- return target_db.metadatas[None]
- return target_db.metadata
-
-
-def run_migrations_offline():
- """Run migrations in 'offline' mode.
-
- This configures the context with just a URL
- and not an Engine, though an Engine is acceptable
- here as well. By skipping the Engine creation
- we don't even need a DBAPI to be available.
-
- Calls to context.execute() here emit the given string to the
- script output.
-
- """
- url = config.get_main_option("sqlalchemy.url")
- context.configure(
- url=url, target_metadata=get_metadata(), literal_binds=True
- )
-
- with context.begin_transaction():
- context.run_migrations()
-
-
-def run_migrations_online():
- """Run migrations in 'online' mode.
-
- In this scenario we need to create an Engine
- and associate a connection with the context.
-
- """
-
- # this callback is used to prevent an auto-migration from being generated
- # when there are no changes to the schema
- # reference: http://alembic.zzzcomputing.com/en/latest/cookbook.html
- def process_revision_directives(context, revision, directives):
- if getattr(config.cmd_opts, 'autogenerate', False):
- script = directives[0]
- if script.upgrade_ops.is_empty():
- directives[:] = []
- logger.info('No changes in schema detected.')
-
- conf_args = current_app.extensions['migrate'].configure_args
- if conf_args.get("process_revision_directives") is None:
- conf_args["process_revision_directives"] = process_revision_directives
-
- connectable = get_engine()
-
- with connectable.connect() as connection:
- context.configure(
- connection=connection,
- target_metadata=get_metadata(),
- **conf_args
- )
-
- with context.begin_transaction():
- context.run_migrations()
-
-
-if context.is_offline_mode():
- run_migrations_offline()
-else:
- run_migrations_online()
diff --git a/migrations/script.py.mako b/migrations/script.py.mako
deleted file mode 100644
index c95e0ea..0000000
--- a/migrations/script.py.mako
+++ /dev/null
@@ -1,24 +0,0 @@
-"""${message}
-
-Revision ID: ${up_revision}
-Revises: ${down_revision | comma,n}
-Create Date: ${create_date}
-
-"""
-from alembic import op
-import sqlalchemy as sa
-${imports if imports else ""}
-
-# revision identifiers, used by Alembic.
-revision = ${repr(up_revision)}
-down_revision = ${repr(down_revision)}
-branch_labels = ${repr(branch_labels)}
-depends_on = ${repr(depends_on)}
-
-
-def upgrade():
- ${upgrades if upgrades else "pass"}
-
-
-def downgrade():
- ${downgrades if downgrades else "pass"}
diff --git a/migrations/versions/5e6021b572ee_add_must_support_elements_json_to_.py b/migrations/versions/5e6021b572ee_add_must_support_elements_json_to_.py
deleted file mode 100644
index b244cc4..0000000
--- a/migrations/versions/5e6021b572ee_add_must_support_elements_json_to_.py
+++ /dev/null
@@ -1,32 +0,0 @@
-"""Add must_support_elements_json to ProcessedIg
-
-Revision ID: 5e6021b572ee
-Revises: 8809253da459
-Create Date: 2025-04-08 11:41:38.532125
-
-"""
-from alembic import op
-import sqlalchemy as sa
-
-
-# revision identifiers, used by Alembic.
-revision = '5e6021b572ee'
-down_revision = '8809253da459'
-branch_labels = None
-depends_on = None
-
-
-def upgrade():
- # ### commands auto generated by Alembic - please adjust! ###
- with op.batch_alter_table('processed_ig', schema=None) as batch_op:
- batch_op.add_column(sa.Column('must_support_elements_json', sa.Text(), nullable=True))
-
- # ### end Alembic commands ###
-
-
-def downgrade():
- # ### commands auto generated by Alembic - please adjust! ###
- with op.batch_alter_table('processed_ig', schema=None) as batch_op:
- batch_op.drop_column('must_support_elements_json')
-
- # ### end Alembic commands ###
diff --git a/migrations/versions/7d0cdff4c7ad_initial_migration_with_user_.py b/migrations/versions/7d0cdff4c7ad_initial_migration_with_user_.py
deleted file mode 100644
index f2a1cf2..0000000
--- a/migrations/versions/7d0cdff4c7ad_initial_migration_with_user_.py
+++ /dev/null
@@ -1,80 +0,0 @@
-"""Initial migration with User, ModuleRegistry, ProcessedIg
-
-Revision ID: 7d0cdff4c7ad
-Revises:
-Create Date: 2025-04-08 08:35:33.204706
-
-"""
-from alembic import op
-import sqlalchemy as sa
-
-
-# revision identifiers, used by Alembic.
-revision = '7d0cdff4c7ad'
-down_revision = None
-branch_labels = None
-depends_on = None
-
-
-def upgrade():
- # ### commands auto generated by Alembic - please adjust! ###
- op.create_table('module_registry',
- sa.Column('id', sa.Integer(), nullable=False),
- sa.Column('module_id', sa.String(length=100), nullable=False),
- sa.Column('is_enabled', sa.Boolean(), nullable=False),
- sa.Column('display_name', sa.String(length=100), nullable=True),
- sa.Column('description', sa.Text(), nullable=True),
- sa.Column('version', sa.String(length=30), nullable=True),
- sa.PrimaryKeyConstraint('id')
- )
- with op.batch_alter_table('module_registry', schema=None) as batch_op:
- batch_op.create_index(batch_op.f('ix_module_registry_module_id'), ['module_id'], unique=True)
-
- op.create_table('processed_ig',
- sa.Column('id', sa.Integer(), nullable=False),
- sa.Column('package_name', sa.String(length=150), nullable=False),
- sa.Column('package_version', sa.String(length=50), nullable=False),
- sa.Column('processed_at', sa.DateTime(), nullable=False),
- sa.Column('status', sa.String(length=50), nullable=True),
- sa.Column('resource_types_json', sa.Text(), nullable=True),
- sa.PrimaryKeyConstraint('id'),
- sa.UniqueConstraint('package_name', 'package_version', name='uq_processed_ig_name_version')
- )
- with op.batch_alter_table('processed_ig', schema=None) as batch_op:
- batch_op.create_index(batch_op.f('ix_processed_ig_package_name'), ['package_name'], unique=False)
- batch_op.create_index(batch_op.f('ix_processed_ig_package_version'), ['package_version'], unique=False)
-
- op.create_table('user',
- sa.Column('id', sa.Integer(), nullable=False),
- sa.Column('username', sa.String(length=64), nullable=True),
- sa.Column('email', sa.String(length=120), nullable=True),
- sa.Column('password_hash', sa.String(length=256), nullable=True),
- sa.Column('role', sa.String(length=20), nullable=False),
- sa.PrimaryKeyConstraint('id')
- )
- with op.batch_alter_table('user', schema=None) as batch_op:
- batch_op.create_index(batch_op.f('ix_user_email'), ['email'], unique=True)
- batch_op.create_index(batch_op.f('ix_user_role'), ['role'], unique=False)
- batch_op.create_index(batch_op.f('ix_user_username'), ['username'], unique=True)
-
- # ### end Alembic commands ###
-
-
-def downgrade():
- # ### commands auto generated by Alembic - please adjust! ###
- with op.batch_alter_table('user', schema=None) as batch_op:
- batch_op.drop_index(batch_op.f('ix_user_username'))
- batch_op.drop_index(batch_op.f('ix_user_role'))
- batch_op.drop_index(batch_op.f('ix_user_email'))
-
- op.drop_table('user')
- with op.batch_alter_table('processed_ig', schema=None) as batch_op:
- batch_op.drop_index(batch_op.f('ix_processed_ig_package_version'))
- batch_op.drop_index(batch_op.f('ix_processed_ig_package_name'))
-
- op.drop_table('processed_ig')
- with op.batch_alter_table('module_registry', schema=None) as batch_op:
- batch_op.drop_index(batch_op.f('ix_module_registry_module_id'))
-
- op.drop_table('module_registry')
- # ### end Alembic commands ###
diff --git a/migrations/versions/8809253da459_rename_resource_types_json_to_resource_.py b/migrations/versions/8809253da459_rename_resource_types_json_to_resource_.py
deleted file mode 100644
index 476d4e5..0000000
--- a/migrations/versions/8809253da459_rename_resource_types_json_to_resource_.py
+++ /dev/null
@@ -1,34 +0,0 @@
-"""Rename resource_types_json to resource_types_info_json in ProcessedIg
-
-Revision ID: 8809253da459
-Revises: 7d0cdff4c7ad
-Create Date: 2025-04-08 09:20:55.669990
-
-"""
-from alembic import op
-import sqlalchemy as sa
-
-
-# revision identifiers, used by Alembic.
-revision = '8809253da459'
-down_revision = '7d0cdff4c7ad'
-branch_labels = None
-depends_on = None
-
-
-def upgrade():
- # ### commands auto generated by Alembic - please adjust! ###
- with op.batch_alter_table('processed_ig', schema=None) as batch_op:
- batch_op.add_column(sa.Column('resource_types_info_json', sa.Text(), nullable=True))
- batch_op.drop_column('resource_types_json')
-
- # ### end Alembic commands ###
-
-
-def downgrade():
- # ### commands auto generated by Alembic - please adjust! ###
- with op.batch_alter_table('processed_ig', schema=None) as batch_op:
- batch_op.add_column(sa.Column('resource_types_json', sa.TEXT(), nullable=True))
- batch_op.drop_column('resource_types_info_json')
-
- # ### end Alembic commands ###
diff --git a/migrations/versions/d8f620f74fbe_add_examples_json_to_processedig.py b/migrations/versions/d8f620f74fbe_add_examples_json_to_processedig.py
deleted file mode 100644
index de42794..0000000
--- a/migrations/versions/d8f620f74fbe_add_examples_json_to_processedig.py
+++ /dev/null
@@ -1,32 +0,0 @@
-"""Add examples_json to ProcessedIg
-
-Revision ID: d8f620f74fbe
-Revises: 5e6021b572ee
-Create Date: 2025-04-08 12:45:21.475913
-
-"""
-from alembic import op
-import sqlalchemy as sa
-
-
-# revision identifiers, used by Alembic.
-revision = 'd8f620f74fbe'
-down_revision = '5e6021b572ee'
-branch_labels = None
-depends_on = None
-
-
-def upgrade():
- # ### commands auto generated by Alembic - please adjust! ###
- with op.batch_alter_table('processed_ig', schema=None) as batch_op:
- batch_op.add_column(sa.Column('examples_json', sa.Text(), nullable=True))
-
- # ### end Alembic commands ###
-
-
-def downgrade():
- # ### commands auto generated by Alembic - please adjust! ###
- with op.batch_alter_table('processed_ig', schema=None) as batch_op:
- batch_op.drop_column('examples_json')
-
- # ### end Alembic commands ###