pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Using GIT to caught delta between database versions
5+ messages / 2 participants
[nested] [flat]

* Using GIT to caught delta between database versions
@ 2018-06-13 17:42  Łukasz Jarych <jaryszek@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Łukasz Jarych @ 2018-06-13 17:42 UTC (permalink / raw)
  To: pgsql-general

Hi Guys,

how use git to catch delta between database versions?

As version i will do schemas.
So we have version one, finishing it, and this version should be put in
GIT.
And created schema for the version.

Which formats i should use?

pg_dump creates only binary files? (i should use text file here).

Best,
Jacek

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Using GIT to caught delta between database versions
@ 2018-06-13 17:47  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Łukasz Jarych <jaryszek@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Adrian Klaver @ 2018-06-13 17:47 UTC (permalink / raw)
  To: Łukasz Jarych <jaryszek@gmail.com>; pgsql-general

On 06/13/2018 10:42 AM, Łukasz Jarych wrote:
> Hi Guys,
> 
> how use git to catch delta between database versions?

Use sqitch?:

https://sqitch.org/

> 
> As version i will do schemas.
> So we have version one, finishing it, and this version should be put in 
> GIT.
> And created schema for the version.
> 
> Which formats i should use?
> 
> pg_dump creates only binary files? (i should use text file here).

It will create text files, that is actually the default:

https://www.postgresql.org/docs/10/static/app-pgdump.html


-F format
--format=format

     Selects the format of the output. format can be one of the following:

     p
     plain

         Output a plain-text SQL script file (the default).

> 
> Best,
> Jacek


-- 
Adrian Klaver
adrian.klaver@aklaver.com




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Using GIT to caught delta between database versions
@ 2018-06-13 18:13  Łukasz Jarych <jaryszek@gmail.com>
  parent: Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Łukasz Jarych @ 2018-06-13 18:13 UTC (permalink / raw)
  To: Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-general

Hi Adrian,

thank you .

why i should use sqitch or any other software to catch the delta?

When i will export plan-text SQL , git should catch delta automatically?
Can you please explain it?

Best,
Jacek



2018-06-13 19:47 GMT+02:00 Adrian Klaver <adrian.klaver@aklaver.com>:

> On 06/13/2018 10:42 AM, Łukasz Jarych wrote:
>
>> Hi Guys,
>>
>> how use git to catch delta between database versions?
>>
>
> Use sqitch?:
>
> https://sqitch.org/
>
>
>> As version i will do schemas.
>> So we have version one, finishing it, and this version should be put in
>> GIT.
>> And created schema for the version.
>>
>> Which formats i should use?
>>
>> pg_dump creates only binary files? (i should use text file here).
>>
>
> It will create text files, that is actually the default:
>
> https://www.postgresql.org/docs/10/static/app-pgdump.html
>
>
> -F format
> --format=format
>
>     Selects the format of the output. format can be one of the following:
>
>     p
>     plain
>
>         Output a plain-text SQL script file (the default).
>
>
>> Best,
>> Jacek
>>
>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com
>

^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Using GIT to caught delta between database versions
@ 2018-06-13 19:09  Adrian Klaver <adrian.klaver@aklaver.com>
  parent: Łukasz Jarych <jaryszek@gmail.com>
  0 siblings, 1 reply; 5+ messages in thread

From: Adrian Klaver @ 2018-06-13 19:09 UTC (permalink / raw)
  To: Łukasz Jarych <jaryszek@gmail.com>; pgsql-general

On 06/13/2018 11:13 AM, Łukasz Jarych wrote:
> Hi Adrian,
> 
> thank you .
> 
> why i should use sqitch or any other software to catch the delta?
> 
> When i will export plan-text SQL , git should catch delta automatically?
> Can you please explain it?

You are correct Git will catch the changes in the plain text files.

What is nice about Sqitch and similar tools is they offer additional 
functionality, such as deploying to different servers(production, dev, 
testing, etc), declaring dependencies between changes, rolling back 
individual changes, etc. To get a sense of what is possible take a look 
here:

https://metacpan.org/pod/sqitchtutorial

I have found it very useful. It comes down to individual preference.

> 
> Best,
> Jacek
> 
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Using GIT to caught delta between database versions
@ 2018-06-14 05:19  Łukasz Jarych <jaryszek@gmail.com>
  parent: Adrian Klaver <adrian.klaver@aklaver.com>
  0 siblings, 0 replies; 5+ messages in thread

From: Łukasz Jarych @ 2018-06-14 05:19 UTC (permalink / raw)
  To: Adrian Klaver <adrian.klaver@aklaver.com>; +Cc: pgsql-general

thank you Adrian,

Best,
Jacek

2018-06-13 21:09 GMT+02:00 Adrian Klaver <adrian.klaver@aklaver.com>:

> On 06/13/2018 11:13 AM, Łukasz Jarych wrote:
>
>> Hi Adrian,
>>
>> thank you .
>>
>> why i should use sqitch or any other software to catch the delta?
>>
>> When i will export plan-text SQL , git should catch delta automatically?
>> Can you please explain it?
>>
>
> You are correct Git will catch the changes in the plain text files.
>
> What is nice about Sqitch and similar tools is they offer additional
> functionality, such as deploying to different servers(production, dev,
> testing, etc), declaring dependencies between changes, rolling back
> individual changes, etc. To get a sense of what is possible take a look
> here:
>
> https://metacpan.org/pod/sqitchtutorial
>
> I have found it very useful. It comes down to individual preference.
>
>
>
>> Best,
>> Jacek
>>
>>
>>
>>
>
> --
> Adrian Klaver
> adrian.klaver@aklaver.com
>

^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2018-06-14 05:19 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-06-13 17:42 Using GIT to caught delta between database versions Łukasz Jarych <jaryszek@gmail.com>
2018-06-13 17:47 ` Adrian Klaver <adrian.klaver@aklaver.com>
2018-06-13 18:13   ` Łukasz Jarych <jaryszek@gmail.com>
2018-06-13 19:09     ` Adrian Klaver <adrian.klaver@aklaver.com>
2018-06-14 05:19       ` Łukasz Jarych <jaryszek@gmail.com>

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