Skip to content

feat: add mongoDB changset example #10914

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Sonichigo
Copy link
Member

Thanks for contributing to the Harness Developer Hub! Our code owners will review your submission.

Description

  • Please describe your changes:
    This pull request introduces a new documentation page, "Get Started with Changelogs," to guide users on how to define and manage changelogs for SQL and MongoDB in Harness Database DevOps. The page includes detailed examples of changelogs for both database types, showcasing schema changes, indexing, and sample data management.

    • SQL Changelog Examples: The page provides YAML examples for SQL changelogs, demonstrating how to create tables, add indexes, insert sample data, and define rollback operations.

    • MongoDB Changelog Examples: Similarly, the page includes YAML examples for MongoDB changelogs, showcasing operations like creating collections, adding indexes (including unique and compound indexes), and managing context-specific changes.

  • Jira/GitHub Issue numbers (if any): https://harness.atlassian.net/browse/DBOPS-1327

  • Preview links/images (Internal contributors only): __________________

PR lifecycle

We aim to merge PRs within one week or less, but delays happen sometimes.

If your PR is open longer than two weeks without any human activity, please tag a code owner in a comment.

PRs must meet these requirements to be merged:

  • Successful preview build.
  • Code owner review.
  • No merge conflicts.
  • Release notes/new features docs: Feature/version released to at least one prod environment.

@bot-gitexp-user
Copy link

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://68763720742ace12b054173e--harness-developer.netlify.app

comment: Create users collection
changes:
- createCollection:
collectionName: users
Copy link
Contributor

Choose a reason for hiding this comment

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

Thoughts on showing the validator syntax that works as well, since it should save folks time? Here's a working example:
- createCollection:
collectionName: pets
options: '{"validator": {"$jsonSchema": {"bsonType": "object", "required":["name","species"]},"properties":{"name":{"bsonType": "string","description": " The Name"},"species":{"bsonType": "string","description": "cat, dog, or other"}}},"validationAction": "warn","validationLevel":"strict"}'

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.

3 participants