diff --git a/pgm/services/factorya/1test-down.sql b/pgm/services/factorya/1test-down.sql new file mode 100644 index 0000000..e280a0d --- /dev/null +++ b/pgm/services/factorya/1test-down.sql @@ -0,0 +1 @@ +drop table if EXISTS testingMigration; \ No newline at end of file diff --git a/pgm/services/factorya/1test-up.sql b/pgm/services/factorya/1test-up.sql new file mode 100644 index 0000000..136b109 --- /dev/null +++ b/pgm/services/factorya/1test-up.sql @@ -0,0 +1,32 @@ +drop table if EXISTS testingMigration; +create table testingMigration ( +col1 int, +col2 text +); + + +insert into testingMigration VALUES +(10, 'some text some text some text') +,(10, 'some text some text some text') +,(10, 'some text some text some text') +,(10, 'some text some text some text') +,(10, 'some text some text some text') +,(10, 'some text some text some text') +,(10, 'some text some text some text') +,(10, 'some text some text some text') +,(10, 'some text some text some text') +,(10, 'some text some text some text') +,(10, 'some text some text some text') +,(10, 'some text some text some text') +,(10, 'some text some text some text') +,(10, 'some text some text some text') +,(10, 'some text some text some text') +,(10, 'some text some text some text') +,(10, 'some text some text some text') +,(10, 'some text some text some text') +,(10, 'some text some text some text') +,(10, 'some text some text some text') +,(10, 'some text some text some text') +,(10, 'some text some text some text') +,(10, 'some text some text some text') +; \ No newline at end of file diff --git a/pgm/services/factorya/2test-up.sql b/pgm/services/factorya/2test-up.sql new file mode 100644 index 0000000..1cbf5e0 --- /dev/null +++ b/pgm/services/factorya/2test-up.sql @@ -0,0 +1 @@ +select count(*) from testingMigration; \ No newline at end of file diff --git a/pgm/services/factory/0main-0-down.sql b/pgm/services/factoryb/0main-0-down.sql similarity index 100% rename from pgm/services/factory/0main-0-down.sql rename to pgm/services/factoryb/0main-0-down.sql diff --git a/pgm/services/factory/0main-0-up.sql b/pgm/services/factoryb/0main-0-up.sql similarity index 100% rename from pgm/services/factory/0main-0-up.sql rename to pgm/services/factoryb/0main-0-up.sql diff --git a/pgm/services/factory/1main1-down.sql b/pgm/services/factoryb/1main1-down.sql similarity index 100% rename from pgm/services/factory/1main1-down.sql rename to pgm/services/factoryb/1main1-down.sql diff --git a/pgm/services/factory/1main1-up.sql b/pgm/services/factoryb/1main1-up.sql similarity index 100% rename from pgm/services/factory/1main1-up.sql rename to pgm/services/factoryb/1main1-up.sql diff --git a/src/main.c b/src/main.c index 01fa004..352f301 100644 --- a/src/main.c +++ b/src/main.c @@ -8,6 +8,7 @@ #include "diff.h" void printHelp(); +const char* version = "1.0.0"; int main(int argc, char *argv[]) { extern char *optarg; @@ -49,7 +50,7 @@ int main(int argc, char *argv[]) { strcpy(connStr, optarg); break; case 'v': - printf("pg_migrate version 0.0.1\n"); + printf("pg_migrate version %s\n", version); exit(0); case 'u': if (d == 1 || u == 1) { @@ -144,7 +145,7 @@ int main(int argc, char *argv[]) { void printHelp() { - printf("\n pg_migrate 0.0.1\n" + printf("\n pg_migrate %s\n" " https://github.com/jwdeitch/pg_migrate\n" " MIT 2017\n\n" @@ -158,7 +159,7 @@ void printHelp() { " -p Soft run. Will display migrations to be ran / rolled back\n" " -g Provisions the public schema with the pg_migrate table, used to track migrations\n\n" - ); + , version); }