Giter Site home page Giter Site logo

planetscale-test's Introduction

PlanetScale pscale CLI helper scripts (Recording from live demo at PlanetScale Happy-Half-Hour)

Ever wanted to accomplish a complex database workflow with pscale CLI and needed a way to automate asynchronous operations like database branch creation or schema change requests merges? Interested in using the PlanetScale database branching, approval and merging features directly out of your pull/merge requests?

image

This is a collection of helper scripts around the PlanetScale CLI to synchronously

Examples from the community how to make use of those pscale workflows

In the issues section of this repo you will find examples how to integrate your favorite framework and CI with the pscale workflow examples provided here. If you have our own examples you like to share with the commmunity and get the chance to win some swag, please add your example here.

Zero-setup Action workflows included โœจ

In case you like to see those helper scripts in action without any further manual configuration, just

  1. Create a copy of this repo by clicking on the green 'Use this template' button or just here. Both private and public repo visibility work.

image

  1. Create a PlanetScale account: If you have not done already, sign up here for a PlanetScale account, you can have one database for free. Do not create a database yet though, this step will be automated as part of the first Action workflow.

  2. Switch to the Actions tab in your repo

image

  1. Start the workflows manually, in the displayed order.

image

  1. When you run the workflows, follow the output where it will ask you to authenticate to PlanetScale by clicking the displayed links.

image

Issue-Ops based workflow

The workflows covered so far have been all triggered as manual GitHub Action jobs. If you start the "Create branch/PR for schema change" workflow, a pull request like this one will be created that is associated with a PlanetScale deploy request and the desired schema changes. Those schema changes can then be applied by adding a /ps-mergecomment to the pull request. This IssueOps command will also create GitHub deployment events, so that you could have other integrations and Action based workflows hook into the deployment lifecycle.

image

You can also create a database branch and deploy request based on an already existing Pull Request using /ps-create: image

If you like to refresh the schema information of your branch or add additional DDL statements, use /ps-update:

image

Approvals can be done using /ps-approve:

image

Finally, you can delete the database branch associated with a Git branch using /ps-delete:

image

Stay tuned for updates and any feedbacks / PRs are welcome ๐Ÿ˜Š

planetscale-test's People

Contributors

sgohlke avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.