Re: Creating complex track changes database - challenge!

2018-02-27 Thread Thiemo Kellner
You can access code with git clone ssh://@git.code.sf.net/p/pg-scd/code pg-scd-code and browse it at https://sourceforge.net/p/pg-scd/code/ On 02/27/18 08:43, Thiemo Kellner wrote: I attached what I have got so far. I will setup a shared repository these days. Zitat von Thiemo Kellner : Hi

Re: Creating complex track changes database - challenge!

2018-02-27 Thread Christian Keil
Hi Jacek, On Mon, 26 Feb 2018 11:44:13 +0100 Łukasz Jarych wrote: > Hi Guys, > > 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: > -a

Re: Creating complex track changes database - challenge!

2018-02-26 Thread Thiemo Kellner
I attached what I have got so far. I will setup a shared repository these days. Zitat von Thiemo Kellner : Hi Lukasz I am working on a generic (reading the information schema and other database metadata), trigger based solution for SCD tables, i. e. tables that keep (or not according to

Re: Creating complex track changes database - challenge!

2018-02-26 Thread Łukasz Jarych
Hi Thiemo, you can share the repository, maybe when i will go more into PostgreSQL i would help you. *Regarding table versionig.* I am thinking about simple solution: 1. Create query or trigger which will be checking last date of inputed data within Table. 2. Export the table into seperate file/b

Re: Creating complex track changes database - challenge!

2018-02-26 Thread Thiemo Kellner
Hi Lukasz I am working on a generic (reading the information schema and other database metadata), trigger based solution for SCD tables, i. e. tables that keep (or not according to SCD type) history of the data. However, it is not far grown and I am not having much time to advance it so i

Re: Creating complex track changes database - challenge!

2018-02-26 Thread Łukasz Jarych
Thank you goeff. I need solution like this: Administrator push button or something like and adding comment (for bitbucket) that after creating update to database. Now whole database is exported to *.sql file, and commit with text provided by Admin. Can i connect using bash script to database and

Re: Creating complex track changes database - challenge!

2018-02-26 Thread geoff hoffman
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://stacko

Re: Creating complex track changes database - challenge!

2018-02-26 Thread Łukasz Jarych
Thank you geoff! I think that i will test 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 : > > > There’s https://flywaydb.org/ > and http://www.liquib

Re: Creating complex track changes database - challenge!

2018-02-26 Thread Alan Gano
I've got a manual method (though it's probably wise to go with a vendor product), that I will just dump here. It tracks all configured tables into a single table containing before/after record images in jsonb. create table aud_audit ( id serial8, timestamp

Re: Creating complex track changes database - challenge!

2018-02-26 Thread geoff hoffman
There’s https://flywaydb.org/ and http://www.liquibase.org/ More: https://dbmstools.com/version-control-tools Also, if you know PHP, Laravel database migrations have worked great for us! https://

Re: Creating complex track changes database - challenge!

2018-02-26 Thread Łukasz Jarych
Hi Guys, I have idea already for creating this complex solution. Please give your notes and tips if you have. 1. Keep all changes within table including: -adding rows -deleting -editing This can be managed by adding triggers and one additional table where you can have sum up what was changed.

Re: Creating complex track changes database - challenge!

2018-02-26 Thread Thomas Kellerer
Łukasz Jarych schrieb am 26.02.2018 um 11:44: > 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 >

Re: Creating complex track changes database - challenge!

2018-02-26 Thread Manuel Gómez
On Mon, Feb 26, 2018 at 11:44 AM Łukasz Jarych wrote: > 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. Tr

Creating complex track changes database - challenge!

2018-02-26 Thread Łukasz Jarych
Hi Guys, 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 s