Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
prompt 1 (claude-3.7-sonnet thinking)
Actua como un Architecto de Sistemas y DBA experto en el diseño de sistemas escalables usando DDD.
La aplicación actual es un sistema ATS en la que actualmente se pueden dar de alta candidatos, sobre los que se aportan datos básicos, experiencias laborales previas, educación y currículum vitae. Quiero ampliar el sistema con nuevas entidades que nos permitan operar el flujo completo de aplicación para diversas posiciones. Para ello, te paso el siguiente ERD en formato mermaid:
"erDiagram
COMPANY {
int id PK
string name
}
EMPLOYEE {
int id PK
int company_id FK
string name
string email
string role
boolean is_active
}
POSITION {
int id PK
int company_id FK
int interview_flow_id FK
string title
text description
string status
boolean is_visible
string location
text job_description
text requirements
text responsibilities
numeric salary_min
numeric salary_max
string employment_type
text benefits
text company_description
date application_deadline
string contact_info
}
INTERVIEW_FLOW {
int id PK
string description
}
INTERVIEW_STEP {
int id PK
int interview_flow_id FK
int interview_type_id FK
string name
int order_index
}
INTERVIEW_TYPE {
int id PK
string name
text description
}
CANDIDATE {
int id PK
string firstName
string lastName
string email
string phone
string address
}
APPLICATION {
int id PK
int position_id FK
int candidate_id FK
date application_date
string status
text notes
}
INTERVIEW {
int id PK
int application_id FK
int interview_step_id FK
int employee_id FK
date interview_date
string result
int score
text notes
}
Quiero que:
prompt 2 (claude-3.7-sonnet thinking)
Ahora quiero que me generes el script de migración, tanto de la nueva estructura del esquema de la base de datos, como de los propios datos existentes al nuevo modelo.
prompt 3 (claude-3.7-sonnet thinking)
cómo aplico el nuevo script de migración?