Skip to content

added empty databases in target - #1045

Open
PulokSaha0706 wants to merge 1 commit into
masterfrom
docs/mssql-migration-target-prerequisite
Open

added empty databases in target#1045
PulokSaha0706 wants to merge 1 commit into
masterfrom
docs/mssql-migration-target-prerequisite

Conversation

@PulokSaha0706

@PulokSaha0706 PulokSaha0706 commented Aug 12, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Documentation
    • Added guidance for creating empty target databases before migration.
    • Included SQL examples for conditionally creating a target database and verifying that it contains no user tables.
    • Documented clean retry requirements, including recreating target databases when necessary.

Signed-off-by: Pulok Saha <puloksaha@appscode.com>
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The MSSQL migration guide now explains how to create empty target databases, recreate them for clean retries, and verify that RestaurantMigrationDB contains no user tables.

Changes

MSSQL database migration

Layer / File(s) Summary
Target database preparation
docs/guides/mssqlserver/migration/databasemigration.md
Adds instructions and SQL to conditionally create RestaurantMigrationDB and verify that it contains no user tables.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

  • kubedb/docs#1030: Adds the migration guide section that this change extends with target-database setup instructions.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: adding empty target databases for the MSSQL migration documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/mssql-migration-target-prerequisite

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/guides/mssqlserver/migration/databasemigration.md`:
- Around line 275-283: Update the target-database verification instructions
after the UserTables query to require a result of 0 and explicitly instruct
readers not to continue the migration when UserTables is nonzero.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0195f010-09cf-4562-a7cc-391291a4d734

📥 Commits

Reviewing files that changed from the base of the PR and between 660a93b and 9c214ab.

📒 Files selected for processing (1)
  • docs/guides/mssqlserver/migration/databasemigration.md

Comment on lines +275 to +283
Verify that the target database has no user tables:

```sql
USE RestaurantMigrationDB;
GO

SELECT COUNT(*) AS UserTables FROM sys.tables WHERE is_ms_shipped = 0;
GO
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

State the required verification result.

The query only displays a count. State that UserTables must be 0 and that the migration must not continue when the result is nonzero. Otherwise, a pre-existing or partially migrated RestaurantMigrationDB can be used as the target.

Suggested clarification
 SELECT COUNT(*) AS UserTables FROM sys.tables WHERE is_ms_shipped = 0;
 GO
+
+The result must be `0`. If it is not `0`, do not apply the migration CR. Delete and recreate the target database, then run this check again.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/guides/mssqlserver/migration/databasemigration.md` around lines 275 -
283, Update the target-database verification instructions after the UserTables
query to require a result of 0 and explicitly instruct readers not to continue
the migration when UserTables is nonzero.

@github-actions

Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit 9c214ab):

https://kubedb-v2-hugo--pr1045-docs-mssql-migration-yd0h1vlh.web.app

(expires Wed, 19 Aug 2026 12:19:02 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 0f29ae8ae0bd54a99bf2b223b6833be47acd5943

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant