Permalink
Browse files

Created gh-pages branch via GitHub

  • Loading branch information...
0 parents commit 2052f2fe027483eddf087a0b64798de356202b34 @gonzalo123 committed Apr 9, 2012
Showing with 564 additions and 0 deletions.
  1. BIN images/checker.png
  2. +120 −0 index.html
  3. +20 −0 javascripts/scale.fix.js
  4. +1 −0 params.json
  5. +60 −0 stylesheets/pygment_trac.css
  6. +363 −0 stylesheets/styles.css
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,120 @@
+<!doctype html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="chrome=1">
+ <title>Pgdbsync by gonzalo123</title>
+
+ <link rel="stylesheet" href="stylesheets/styles.css">
+ <link rel="stylesheet" href="stylesheets/pygment_trac.css">
+ <script src="javascripts/scale.fix.js"></script>
+ <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+
+ <!--[if lt IE 9]>
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+ </head>
+ <body>
+ <div class="wrapper">
+ <header>
+ <h1>Pgdbsync</h1>
+<p>Keep our PostgreSQL's development server and production servers synchronized</p>
+ <p class="view"><a href="https://github.com/gonzalo123/pgdbsync">View the Project on GitHub <small>gonzalo123/pgdbsync</small></a></p>
+ <ul>
+ <li><a href="https://github.com/gonzalo123/pgdbsync/zipball/master">Download <strong>ZIP File</strong></a></li>
+ <li><a href="https://github.com/gonzalo123/pgdbsync/tarball/master">Download <strong>TAR Ball</strong></a></li>
+ <li><a href="https://github.com/gonzalo123/pgdbsync">View On <strong>GitHub</strong></a></li>
+ </ul>
+ </header>
+ <section>
+ <p>pgdbsync allows us to track the differences in the database structure between different databases. It also create the needed script to synchronize the servers and even to run the script.</p>
+
+<p>The usage of pgdbsync command line script is the following one:</p>
+
+<ul>
+<li>-c [schema]</li>
+<li>-f [from database]</li>
+<li>-t [to database]</li>
+<li>-a [action: diff | summary | run]</li>
+</ul><h3>Summary</h3>
+
+<pre><code>./pgdbsync -s web -f devel -t prod -a summary
+HOST : production :: prod1
+--------------------------------------------
+function
+ create :: WEB.hello(varchar)
+tables
+ create :: WEB.test
+view
+ create :: WEB.testview
+
+[OK] end process
+</code></pre>
+
+<h3>Creating diff script</h3>
+
+<pre><code>./pgdbsync -s wf -f devel -t prod -a diff
+HOST : production :: prod1
+--------------------------------------------
+CREATE OR REPLACE FUNCTION web.hello(item character varying)
+ RETURNS character varying
+ LANGUAGE plpgsql
+AS $function$
+DECLARE
+BEGIN
+ return "Hi " || item;
+END;
+$function$
+
+CREATE TABLE web.test(
+ test_name character NOT NULL,
+ test_id integer NOT NULL,
+ test_date timestamp without time zone NOT NULL,
+ CONSTRAINT pk_test PRIMARY KEY (test_date)
+)
+TABLESPACE web;
+ALTER TABLE web.test OWNER TO user;
+
+CREATE OR REPLACE VIEW web.testview AS
+ SELECT test.test_name, test.test_id, test.test_date FROM web.test WHERE (test.test_name ~~ 't%'::text);;
+ALTER TABLE web.testview OWNER TO user;
+[OK] end process
+</code></pre>
+
+<h3>executing diff script</h3>
+
+<pre><code>./pgdbsync -s web -f devel -t prod -a run
+HOST : production :: prod1
+----------------------------------
+
+[OK] end process
+</code></pre>
+
+<h3>creating diff script again</h3>
+
+<pre><code>./pgdbsync -s wf -f devel -t prod1 -a diff
+
+HOST : prododuction :: prod1
+--------------------------------------------
+
+drop function web.hello(varchar);
+
+DROP TABLE web.test;
+
+drop view web.testview;
+
+[OK] end process
+</code></pre>
+
+<p>More info:</p>
+
+<p><a href="http://gonzalo123.wordpress.com/2010/12/13/keep-our-postgresql-databases-syncronized-with-php-database-version-control/">http://gonzalo123.wordpress.com/2010/12/13/keep-our-postgresql-databases-syncronized-with-php-database-version-control/</a></p>
+ </section>
+ </div>
+ <footer>
+ <p>Project maintained by <a href="https://github.com/gonzalo123">gonzalo123</a></p>
+ <p>Hosted on GitHub Pages &mdash; Theme by <a href="https://github.com/orderedlist">orderedlist</a></p>
+ </footer>
+ <!--[if !IE]><script>fixScale(document);</script><!--<![endif]-->
+ </body>
+</html>
@@ -0,0 +1,20 @@
+fixScale = function(doc) {
+
+ var addEvent = 'addEventListener',
+ type = 'gesturestart',
+ qsa = 'querySelectorAll',
+ scales = [1, 1],
+ meta = qsa in doc ? doc[qsa]('meta[name=viewport]') : [];
+
+ function fix() {
+ meta.content = 'width=device-width,minimum-scale=' + scales[0] + ',maximum-scale=' + scales[1];
+ doc.removeEventListener(type, fix, true);
+ }
+
+ if ((meta = meta[meta.length - 1]) && addEvent in doc) {
+ fix();
+ scales = [.25, 1.6];
+ doc[addEvent](type, fix, true);
+ }
+
+};
@@ -0,0 +1 @@
+{"name":"Pgdbsync","body":"pgdbsync allows us to track the differences in the database structure between different databases. It also create the needed script to synchronize the servers and even to run the script.\r\n\r\nThe usage of pgdbsync command line script is the following one:\r\n\r\n* -c [schema]\r\n* -f [from database]\r\n* -t [to database]\r\n* -a [action: diff | summary | run]\r\n\r\n### Summary\r\n```\r\n./pgdbsync -s web -f devel -t prod -a summary\r\nHOST : production :: prod1\r\n--------------------------------------------\r\nfunction\r\n create :: WEB.hello(varchar)\r\ntables\r\n create :: WEB.test\r\nview\r\n create :: WEB.testview\r\n\r\n[OK] end process\r\n```\r\n### Creating diff script\r\n```\r\n./pgdbsync -s wf -f devel -t prod -a diff\r\nHOST : production :: prod1\r\n--------------------------------------------\r\nCREATE OR REPLACE FUNCTION web.hello(item character varying)\r\n RETURNS character varying\r\n LANGUAGE plpgsql\r\nAS $function$\r\nDECLARE\r\nBEGIN\r\n return \"Hi \" || item;\r\nEND;\r\n$function$\r\n\r\nCREATE TABLE web.test(\r\n test_name character NOT NULL,\r\n test_id integer NOT NULL,\r\n test_date timestamp without time zone NOT NULL,\r\n CONSTRAINT pk_test PRIMARY KEY (test_date)\r\n)\r\nTABLESPACE web;\r\nALTER TABLE web.test OWNER TO user;\r\n\r\nCREATE OR REPLACE VIEW web.testview AS\r\n SELECT test.test_name, test.test_id, test.test_date FROM web.test WHERE (test.test_name ~~ 't%'::text);;\r\nALTER TABLE web.testview OWNER TO user;\r\n[OK] end process\r\n```\r\n### executing diff script\r\n```\r\n./pgdbsync -s web -f devel -t prod -a run\r\nHOST : production :: prod1\r\n----------------------------------\r\n\r\n[OK] end process\r\n```\r\n### creating diff script again\r\n```\r\n./pgdbsync -s wf -f devel -t prod1 -a diff\r\n\r\nHOST : prododuction :: prod1\r\n--------------------------------------------\r\n\r\ndrop function web.hello(varchar);\r\n\r\nDROP TABLE web.test;\r\n\r\ndrop view web.testview;\r\n\r\n[OK] end process\r\n```\r\nMore info:\r\n\r\nhttp://gonzalo123.wordpress.com/2010/12/13/keep-our-postgresql-databases-syncronized-with-php-database-version-control/","tagline":"Keep our PostgreSQL's development server and production servers synchronized","google":"","note":"Don't delete this file! It's used internally to help with page regeneration."}
@@ -0,0 +1,60 @@
+.highlight .hll { background-color: #49483e }
+.highlight { background: #3A3C42; color: #f8f8f2 }
+.highlight .c { color: #75715e } /* Comment */
+.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
+.highlight .k { color: #66d9ef } /* Keyword */
+.highlight .l { color: #ae81ff } /* Literal */
+.highlight .n { color: #f8f8f2 } /* Name */
+.highlight .o { color: #f92672 } /* Operator */
+.highlight .p { color: #f8f8f2 } /* Punctuation */
+.highlight .cm { color: #75715e } /* Comment.Multiline */
+.highlight .cp { color: #75715e } /* Comment.Preproc */
+.highlight .c1 { color: #75715e } /* Comment.Single */
+.highlight .cs { color: #75715e } /* Comment.Special */
+.highlight .ge { font-style: italic } /* Generic.Emph */
+.highlight .gs { font-weight: bold } /* Generic.Strong */
+.highlight .kc { color: #66d9ef } /* Keyword.Constant */
+.highlight .kd { color: #66d9ef } /* Keyword.Declaration */
+.highlight .kn { color: #f92672 } /* Keyword.Namespace */
+.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
+.highlight .kr { color: #66d9ef } /* Keyword.Reserved */
+.highlight .kt { color: #66d9ef } /* Keyword.Type */
+.highlight .ld { color: #e6db74 } /* Literal.Date */
+.highlight .m { color: #ae81ff } /* Literal.Number */
+.highlight .s { color: #e6db74 } /* Literal.String */
+.highlight .na { color: #a6e22e } /* Name.Attribute */
+.highlight .nb { color: #f8f8f2 } /* Name.Builtin */
+.highlight .nc { color: #a6e22e } /* Name.Class */
+.highlight .no { color: #66d9ef } /* Name.Constant */
+.highlight .nd { color: #a6e22e } /* Name.Decorator */
+.highlight .ni { color: #f8f8f2 } /* Name.Entity */
+.highlight .ne { color: #a6e22e } /* Name.Exception */
+.highlight .nf { color: #a6e22e } /* Name.Function */
+.highlight .nl { color: #f8f8f2 } /* Name.Label */
+.highlight .nn { color: #f8f8f2 } /* Name.Namespace */
+.highlight .nx { color: #a6e22e } /* Name.Other */
+.highlight .py { color: #f8f8f2 } /* Name.Property */
+.highlight .nt { color: #f92672 } /* Name.Tag */
+.highlight .nv { color: #f8f8f2 } /* Name.Variable */
+.highlight .ow { color: #f92672 } /* Operator.Word */
+.highlight .w { color: #f8f8f2 } /* Text.Whitespace */
+.highlight .mf { color: #ae81ff } /* Literal.Number.Float */
+.highlight .mh { color: #ae81ff } /* Literal.Number.Hex */
+.highlight .mi { color: #ae81ff } /* Literal.Number.Integer */
+.highlight .mo { color: #ae81ff } /* Literal.Number.Oct */
+.highlight .sb { color: #e6db74 } /* Literal.String.Backtick */
+.highlight .sc { color: #e6db74 } /* Literal.String.Char */
+.highlight .sd { color: #e6db74 } /* Literal.String.Doc */
+.highlight .s2 { color: #e6db74 } /* Literal.String.Double */
+.highlight .se { color: #ae81ff } /* Literal.String.Escape */
+.highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */
+.highlight .si { color: #e6db74 } /* Literal.String.Interpol */
+.highlight .sx { color: #e6db74 } /* Literal.String.Other */
+.highlight .sr { color: #e6db74 } /* Literal.String.Regex */
+.highlight .s1 { color: #e6db74 } /* Literal.String.Single */
+.highlight .ss { color: #e6db74 } /* Literal.String.Symbol */
+.highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
+.highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */
+.highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */
+.highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */
+.highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */
Oops, something went wrong.

0 comments on commit 2052f2f

Please sign in to comment.