londiste.upgrade_schema(): magic schema upgrade
authorMarko Kreen <markokr@gmail.com>
Thu, 8 Sep 2011 15:12:31 +0000 (17:12 +0200)
committerMarko Kreen <markokr@gmail.com>
Thu, 8 Sep 2011 15:12:31 +0000 (17:12 +0200)
ATM does nothing.

sql/londiste/expected/londiste_install.out
sql/londiste/functions/londiste.upgrade_schema.sql [new file with mode: 0644]
sql/londiste/structure/functions.sql

index e4527e08f622dede3adcd51ce91e0c941b26eb21..3cc747e595d0f1d7a4dd254a48049dd276fa4c54 100644 (file)
@@ -1 +1,16 @@
 \set ECHO off
+ upgrade_schema 
+----------------
+              0
+(1 row)
+
+ upgrade_schema 
+----------------
+              0
+(1 row)
+
+ upgrade_schema 
+----------------
+              0
+(1 row)
+
diff --git a/sql/londiste/functions/londiste.upgrade_schema.sql b/sql/londiste/functions/londiste.upgrade_schema.sql
new file mode 100644 (file)
index 0000000..8da164f
--- /dev/null
@@ -0,0 +1,12 @@
+
+create or replace function londiste.upgrade_schema()
+returns int4 as $$
+-- updates table structure if necessary
+declare
+    cnt int4 = 0;
+begin
+    return cnt;
+end;
+$$ language plpgsql;
+
+
index a180eaf37744fb42aaf4e9da7fe84aa0b0bbbe20..2f1fa1cc6d592a06e58a7425ebaca58449badd62 100644 (file)
@@ -1,5 +1,9 @@
 -- Section: Londiste functions
 
+-- upgrade schema
+\i functions/londiste.upgrade_schema.sql
+select londiste.upgrade_schema();
+
 -- Group: Information
 \i functions/londiste.get_seq_list.sql
 \i functions/londiste.get_table_list.sql