diff --git a/docs/migrationOpsContext.md b/docs/migrationOpsContext.md new file mode 100644 index 0000000000..a53503c679 --- /dev/null +++ b/docs/migrationOpsContext.md @@ -0,0 +1,2 @@ +- Migration operations should include a review phase to assess the impact of schema changes on existing data before deployment. +- Timing of migrations should consider the usage of the affected models to minimize disruption during peak usage times. \ No newline at end of file diff --git a/docs/migrationPatterns.md b/docs/migrationPatterns.md new file mode 100644 index 0000000000..e8ea294e95 --- /dev/null +++ b/docs/migrationPatterns.md @@ -0,0 +1,3 @@ +- Before adding required fields, review the entire codebase to ensure compatibility with new schema changes, particularly for fields that impact critical functionality. +- Implement a strategy to safely introduce new fields by either making them optional initially or providing sensible default values to avoid migration failures. +- Always ensure that the migration process considers existing records and their compatibility with the new schema. \ No newline at end of file diff --git a/docs/schemaContext b/docs/schemaContext new file mode 100644 index 0000000000..ae029a75ec --- /dev/null +++ b/docs/schemaContext @@ -0,0 +1,2 @@ +- New fields should be added with consideration of existing application dependencies, ensuring they won’t disrupt current functionality. +- If a new field is critical for functionality, constraints should be established to maintain data integrity and prevent null or invalid entries. \ No newline at end of file diff --git a/frontend/apps/migration-web/prisma/schema.prisma b/frontend/apps/migration-web/prisma/schema.prisma index 987a1ee02e..b28b547ebf 100644 --- a/frontend/apps/migration-web/prisma/schema.prisma +++ b/frontend/apps/migration-web/prisma/schema.prisma @@ -186,4 +186,5 @@ model PRCommit { pullRequest PullRequest @relation(fields: [pullRequestId], references: [id]) commitHash String committedAt DateTime -} \ No newline at end of file + sample String +}