altocompta/html/admin/sql/mod1/make-sql
sparkyx 53234e02f3 NEW :
In order to get easier the installation and the upgrade of the database
a new module webbased has been created, the old version of install.sh
is now obsolete
2005-02-06 01:05:14 +00:00

12 lines
540 B
Text
Executable file

pg_dump -s mod1 > schema.sql
awk '/SEQUENCE/,/;/ { print $0;}' < schema.sql > sequence.sql
awk '/CREATE TABLE/,/;/ { print $0;}' < schema.sql > table.sql
awk '/CREATE VIEW/,/;/ { print $0;}' < schema.sql > view.sql
awk '/INDEX/,/;/ { print $0;}' < schema.sql > index.sql
awk '/ALTER TABLE/,/;/ { print $0;}' < schema.sql > constraint.sql
awk '/FUNCTION/,/LANGUAGE/ { print $0;}' < schema.sql > function.sql
awk '/COMMENT/,/;/ {print $0;}' < schema.sql > comment.sql
grep setval schema.sql >> sequence.sql
pg_dump -D -a -O mod1 > data.sql