Best Practices Guide
Best practices for using DevSync.AI Dashboard effectively and safely.
Migration Execution
1. Always Validate First
Do: Run dry-run validation before applying migrations
Validation catches syntax errors and connection issues before execution.
Don't: Apply migrations without validating
Skipping validation can lead to execution failures in production.
2. Review SQL Carefully
Understand what the migration will do before executing. Review the generated SQL to ensure it matches your expectations and won't cause unintended side effects.
Tip: Use AI explanations to understand complex migrations better and assess risks before applying.
3. Test in Development First
Always test migrations in development or staging environments before applying them to production. This helps identify issues early and ensures your migration works as expected.
4. Keep Database Backups
Always backup your database before applying migrations in production. While migrations run in transactions, having a backup ensures you can recover if something goes wrong.
Warning: Some migrations cannot be rolled back. Always maintain up-to-date backups of your production database.
5. Monitor Execution
Watch migration execution and check results. Keep the dashboard open while migrations are running and review execution history after completion.
Project Management
1. Use Descriptive Names
Use clear, descriptive project names that indicate the purpose and scope of the project. This makes it easier to manage multiple projects and find what you need.
2. Configure Schema Type Correctly
Select the correct schema type for your project. Using the wrong schema type will cause scanning issues and incorrect mismatch detection.
Supported Schema Types:
- Prisma
- Supabase
- TypeORM
- Sequelize
- Drizzle ORM
- Django
- SQLAlchemy
- Raw SQL
- Kysely
3. Keep Connection Strings Secure
Store database connection strings securely. Never commit them to version control or share them publicly. Use environment variables or secure storage solutions.
Security
1. Use Strong Authentication
Use strong passwords and enable two-factor authentication (2FA) if available. Never share accounts or credentials with other users.
2. Manage API Keys Securely
Store API keys securely and never commit them to version control. Use environment variables or secure secret management tools. Rotate keys regularly.
3. Review Access Regularly
Periodically review who has access to your projects. Remove access for users who no longer need it and ensure permissions are set appropriately.
Workflow Recommendations
Recommended Workflow
- Run scan in development environment
- Review mismatches and generate migration
- Validate migration with dry-run
- Apply migration in development
- Test application thoroughly
- Repeat process in staging
- Backup production database
- Apply migration in production
- Monitor execution and verify results