Includes: API (Express/TypeScript), Astro site, Python workers, document generators, FCC compliance tools, Canada CRTC formation, Ansible infrastructure, and deployment scripts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
22 lines
719 B
YAML
22 lines
719 B
YAML
---
|
|
# Run a specific SQL migration against the app database
|
|
# Usage: ansible-playbook playbooks/run-migrations.yml -e "migration=001_core_tables.sql"
|
|
|
|
- name: Run database migration
|
|
hosts: pw
|
|
become: true
|
|
tasks:
|
|
- name: Copy migration file
|
|
ansible.builtin.copy:
|
|
src: "{{ playbook_dir }}/../../api/migrations/{{ migration }}"
|
|
dest: "/tmp/{{ migration }}"
|
|
|
|
- name: Execute migration
|
|
community.docker.docker_container_exec:
|
|
container: performancewest-postgres-1
|
|
command: psql -U {{ db_user }} -d {{ db_name }} -f /tmp/{{ migration }}
|
|
register: migration_result
|
|
|
|
- name: Show result
|
|
ansible.builtin.debug:
|
|
var: migration_result.stdout_lines
|