pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: geoff hoffman <geoff@rxmg.com>
To: PG-General Mailing List <pgsql-general@postgresql.org>
Subject: Re: Creating complex track changes database - challenge!
Date: Mon, 26 Feb 2018 13:45:35 -0700
Message-ID: <2F51CE74-A348-41DC-A673-7A39D4DE86BE@rxmg.com> (raw)
In-Reply-To: <CAGv31of-0x3N0=beHTpNsQGUtmc2hCtEY9xwxQeHrc2QsPXNBQ@mail.gmail.com>
References: <CAGv31oeZtBP6PefUADybfc8EwwR+gJ3h281WO_9zsvk9uyS0AQ@mail.gmail.com>
	<C8B00401-0951-4E18-BA64-714CBB0ECF5D@rxmg.com>
	<CAGv31of-0x3N0=beHTpNsQGUtmc2hCtEY9xwxQeHrc2QsPXNBQ@mail.gmail.com>

I would personally do that separately: write a bash script & cron job that does a schema dump every hour, and (if there are any changes) commits any changes to your schema repository; then you can use Github or Bitbucket web hooks to do stuff with the changeset when it’s pushed. 

https://stackoverflow.com/questions/3878624/how-do-i-programmatically-determine-if-there-are-uncommi... <https://stackoverflow.com/questions/3878624/how-do-i-programmatically-determine-if-there-are-uncommi...;
https://stackoverflow.com/questions/24772591/check-if-git-has-changes-programmatically <https://stackoverflow.com/questions/24772591/check-if-git-has-changes-programmatically; 



> On Feb 26, 2018, at 9:36 AM, Łukasz Jarych <jaryszek@gmail.com> wrote:
> 
> Thank you geoff! 
> 
> I think that i will test http://www.liquibase.org/ <http://www.liquibase.org/; this one. 
> 
> what about setting up trigger to metadata (structural table) to find if column was added for example? 
> 
> Best,
> Jacek
> 
> 2018-02-26 16:43 GMT+01:00 geoff hoffman <geoff@rxmg.com <mailto:geoff@rxmg.com>>:
> 
> 
> There’s https://flywaydb.org/ <https://flywaydb.org/;
> and http://www.liquibase.org/ <http://www.liquibase.org/;
> 
> More: https://dbmstools.com/version-control-tools <https://dbmstools.com/version-control-tools; 
> 
> Also, if you know PHP, Laravel database migrations have worked great for us!
> https://laravel.com/docs/5.6/migrations <https://laravel.com/docs/5.6/migrations;
> 
> 
> 
>> On Feb 26, 2018, at 3:44 AM, Łukasz Jarych <jaryszek@gmail.com <mailto:jaryszek@gmail.com>> wrote:
>> 
>> i would like to ask you for help with track changes to my database. 
>> I am new to PosgtreeSQL but i have to learn it quickly because of my boss. 
>> 
>> I have to:
>> 
>> 1. Keep all changes within table including:
>> -adding rows
>> -deleting
>> -editing
>> 
>> 2. Save table with specific state and recover specific state (so go back to previous table versions) including comparing tables.
>> 
>> 3. Track all DLL and DML changes with possibility to ho back to previous version. 
>> 
> 
> 

view thread (14+ messages)  latest in thread

Message-ID: <2F51CE74-A348-41DC-A673-7A39D4DE86BE@rxmg.com>
Permalink:  ../2F51CE74-A348-41DC-A673-7A39D4DE86BE@rxmg.com/
Also on:    postgresql.org/message-id/2F51CE74-A348-41DC-A673-7A39D4DE86BE@rxmg.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: geoff@rxmg.com
  Subject: Re: Creating complex track changes database - challenge!
  In-Reply-To: <2F51CE74-A348-41DC-A673-7A39D4DE86BE@rxmg.com>
  References: <CAGv31oeZtBP6PefUADybfc8EwwR+gJ3h281WO_9zsvk9uyS0AQ@mail.gmail.com> <C8B00401-0951-4E18-BA64-714CBB0ECF5D@rxmg.com> <CAGv31of-0x3N0=beHTpNsQGUtmc2hCtEY9xwxQeHrc2QsPXNBQ@mail.gmail.com> <2F51CE74-A348-41DC-A673-7A39D4DE86BE@rxmg.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox