Coder Social home page Coder Social logo

pgvc's Introduction

pgvc (PostgreSQL version control)

  • What: It's like git, but for PostgreSQL data.
  • Why: My stakeholders need it.
  • Should you use it: Not yet, but maybe if you contribute we can get it to a point where we can say "yes"!
  • Is this a good idea: We'll find out. I'm optimistic.
  • Is there any association with git: No, I mirror their interface mostly because I think it's explanatory and amusing.

Example

See example_git_style.rb. There is also an example.rb, but that interface is expected to change significantly.

Getting set up for development

  • Install and run postgresql
  • Install Ruby, we use it for testing
  • Install bundler, which will manage dependencies: gem install bundler
  • Install test dependencies: bundle install
  • Run the tests bundle exec rspec

Ways to contribute

  • If you're interested in participating, helping to identify potential showstoppers would be great!
  • If you have ideas about how to get around potential showstoppers, that would be great, too!
  • We need to figure out merging
  • We need a more scalable format for storing tables (maybe the way that git does arrays?)
  • Anything that says "FIXME" or "TODO" in the code :)
  • For the vc interface, I want to remove "user" from nearly every function that receives it
  • There should probably be "deref" function, which takes a branch-name/branch-id/vc_hash, and returns its commit.
  • If you know a way for me to alias the type character (32) as vc_hash, that would be wonderful, it feels like an implementation detail that is being scattered around everything that touches it.
  • If you know a lot of SQL and want to code review the methods to find ways to improve them, that would be great.
  • Is my trigger optimal? It does a "for each row", but maybe that's not a good way to do it.
  • We need to figure out migrations, ie changes to a table's structure. I think you might be able to observe when a table changes, and then grab the code that changed it and apply it to the other tables, as well. We will probably need to apply it to the stored values, I'm thinking render them all into a table without constraints, apply them, then save them back into vc.rows, and updating anything that points at their value. Yes, this would be a change to history, but I'm comfortable with that, I don't have the need that git does, as all versions of the database will be stored here. UPDATE: Looks like you can't grab the code that changed it, they only define tg_tag and tg_event, which do not contain that information. See here, and here.
  • Would it make more sense to make a schema per user rather than a schema per branch?
  • Would be nice to have tags, which are like branches, except they don't get a schema, ie a way to name a commit
  • What about makng the insertion of records into vc.rows happen on commit instead of at the time of insert? Or allowing them to be deferred?

pgvc's People

Contributors

joshcheek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

jmmastey

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.