private static void RecreateSchemaAndInstallObjects()
        {
            var provider = ConnectionUtils.GetConnectionProvider();

            using (var connectionHolder = provider.AcquireConnection())
            {
                var connection     = connectionHolder.Connection;
                var databaseName   = ConnectionUtils.GetDatabaseName();
                var databaseExists = connection.ExecuteScalar <int>(@"select COUNT(*) from pg_database where datname = @databaseName;",
                                                                    new { databaseName = databaseName }
                                                                    ) > 0;

                if (!databaseExists)
                {
                    connection.Execute(@"CREATE DATABASE @databaseName", new { databaseName = databaseName });
                }
            }

            new DatabaseInitializer(ConnectionUtils.GetConnectionProvider(), ConnectionUtils.GetSchemaName()).Initialize();

            using (var connectionHolder = provider.AcquireConnection())
            {
                PostgreSqlTestObjectsInitializer.CleanTables(connectionHolder.Connection);
            }
        }
        private static void CleanTables()
        {
            var provider = ConnectionUtils.GetConnectionProvider();

            using (var connection = provider.AcquireConnection())
            {
                PostgreSqlTestObjectsInitializer.CleanTables(connection.Connection);
            }
        }