Skip to content

Commit 467cb4b

Browse files
committed
refactor: flow-php/postgresql - migrations core
chore: introduce parameters() dsl function to posgresql client feature: introduce schema to flow-php/postgresql - create schema definition - read whole Catalog from a postgresql db - added dependeny from flow-php/types - created TypeMapper to quickly map rows into collections of structures feature: catalog comparator - including comparator for all db objects refactor: move parsing data type string to dedicated parser refactor: unify naming convetion with colum and value type refactoring: optimizations and renames - geneate diff sql's for migratiosn up/down - unify naming of postgresql dsl - cover unlogged tables - added toSql() to Schema objects feature: missing postgresql table options feature: table rename detection refactor: remove RawCondition and RawExpression - unify DSL - replace inline strings with proper query builders in tests refactor: split postgresql dsl into smaller files refactor: simplify diffs to return only one way migration sqls refactor: make diffs to return query builders feature: improve rename strategies - introduce similarity names abstraction - introduce rename strategy abstraction feature: detect if the view requires an update refactor: allow to pass strings instead of col() table() expressions - update documentation fix: introduce execution order strategy chore: flow-php/postgresql-migrations skeleton
1 parent ab43f9e commit 467cb4b

File tree

422 files changed

+29889
-13723
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

422 files changed

+29889
-13723
lines changed

.codecov.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ component_management:
6060
name: lib-postgresql
6161
paths:
6262
- src/lib/postgresql/**
63+
- component_id: lib-postgresql-migrations
64+
name: lib-postgresql-migrations
65+
paths:
66+
- src/lib/postgresql-migrations/**
6367
- component_id: lib-telemetry
6468
name: lib-telemetry
6569
paths:

.github/workflows/monorepo-split.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ jobs:
4444
split_repository: 'types'
4545
- local_path: 'src/lib/postgresql'
4646
split_repository: 'postgresql'
47+
- local_path: 'src/lib/postgresql-migrations'
48+
split_repository: 'postgresql-migrations'
4749
- local_path: 'src/lib/telemetry'
4850
split_repository: 'telemetry'
4951

bin/docs.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,12 @@ public function execute(InputInterface $input, OutputInterface $output) : int
6060
__DIR__ . '/../src/adapter/etl-adapter-xml/src/Flow/ETL/Adapter/XML/functions.php',
6161
__DIR__ . '/../src/lib/filesystem/src/Flow/Filesystem/DSL/functions.php',
6262
__DIR__ . '/../src/lib/types/src/Flow/Types/DSL/functions.php',
63-
__DIR__ . '/../src/lib/postgresql/src/Flow/PostgreSql/DSL/functions.php',
63+
__DIR__ . '/../src/lib/postgresql/src/Flow/PostgreSql/DSL/schema.php',
64+
__DIR__ . '/../src/lib/postgresql/src/Flow/PostgreSql/DSL/query.php',
65+
__DIR__ . '/../src/lib/postgresql/src/Flow/PostgreSql/DSL/condition.php',
66+
__DIR__ . '/../src/lib/postgresql/src/Flow/PostgreSql/DSL/parser.php',
67+
__DIR__ . '/../src/lib/postgresql/src/Flow/PostgreSql/DSL/client.php',
68+
__DIR__ . '/../src/lib/postgresql-migrations/src/Flow/PostgreSql/Migrations/DSL/functions.php',
6469
__DIR__ . '/../src/lib/telemetry/src/Flow/Telemetry/DSL/functions.php',
6570
__DIR__ . '/../src/lib/azure-sdk/src/Flow/Azure/SDK/DSL/functions.php',
6671
__DIR__ . '/../src/bridge/filesystem/azure/src/Flow/Filesystem/Bridge/Azure/DSL/functions.php',

composer.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104
"flow-php/parquet": "self.version",
105105
"flow-php/parquet-viewer": "self.version",
106106
"flow-php/postgresql": "self.version",
107+
"flow-php/postgresql-migrations": "self.version",
107108
"flow-php/psr7-telemetry-bridge": "self.version",
108109
"flow-php/psr18-telemetry-bridge": "self.version",
109110
"flow-php/snappy": "self.version",
@@ -157,6 +158,7 @@
157158
"src/lib/parquet-viewer/src/Flow",
158159
"src/lib/parquet/src/Flow",
159160
"src/lib/postgresql/src/Flow",
161+
"src/lib/postgresql-migrations/src/Flow",
160162
"src/lib/snappy/src/Flow",
161163
"src/lib/telemetry/src/Flow",
162164
"src/lib/types/src/Flow",
@@ -204,8 +206,13 @@
204206
"src/lib/parquet/src/Flow/Parquet/functions.php",
205207
"src/lib/parquet/src/Flow/Parquet/Binary/functions.php",
206208
"src/lib/parquet/src/stubs.php",
207-
"src/lib/postgresql/src/Flow/PostgreSql/DSL/functions.php",
209+
"src/lib/postgresql/src/Flow/PostgreSql/DSL/client.php",
210+
"src/lib/postgresql/src/Flow/PostgreSql/DSL/condition.php",
211+
"src/lib/postgresql/src/Flow/PostgreSql/DSL/parser.php",
212+
"src/lib/postgresql/src/Flow/PostgreSql/DSL/query.php",
213+
"src/lib/postgresql/src/Flow/PostgreSql/DSL/schema.php",
208214
"src/lib/postgresql/src/stubs.php",
215+
"src/lib/postgresql-migrations/src/Flow/PostgreSql/Migrations/DSL/functions.php",
209216
"src/lib/snappy/polyfill.php",
210217
"src/lib/telemetry/src/Flow/Telemetry/DSL/functions.php",
211218
"src/lib/types/src/Flow/Types/DSL/functions.php"
@@ -250,6 +257,7 @@
250257
"src/lib/parquet-viewer/tests/Flow",
251258
"src/lib/parquet/tests/Flow",
252259
"src/lib/postgresql/tests/Flow",
260+
"src/lib/postgresql-migrations/tests/Flow",
253261
"src/lib/snappy/tests/Flow",
254262
"src/lib/telemetry/tests/Flow",
255263
"src/lib/types/tests/Flow",
@@ -296,6 +304,7 @@
296304
"@test:lib:parquet",
297305
"@test:lib:parquet-viewer",
298306
"@test:lib:postgresql",
307+
"@test:lib:postgresql-migrations",
299308
"@test:lib:snappy",
300309
"@test:lib:telemetry",
301310
"@test:lib:types"
@@ -371,6 +380,10 @@
371380
"tools/phpunit/vendor/bin/phpunit --testsuite=lib-postgresql-unit --log-junit ./var/phpunit/logs/lib-postgresql-unit.junit.xml --coverage-clover=./var/phpunit/coverage/clover/lib-postgresql-unit.coverage.xml",
372381
"tools/phpunit/vendor/bin/phpunit --testsuite=lib-postgresql-integration --log-junit ./var/phpunit/logs/lib-postgresql-integration.junit.xml --coverage-clover=./var/phpunit/coverage/clover/lib-postgresql-integration.coverage.xml"
373382
],
383+
"test:lib:postgresql-migrations": [
384+
"tools/phpunit/vendor/bin/phpunit --testsuite=lib-postgresql-migrations-unit --log-junit ./var/phpunit/logs/lib-postgresql-migrations-unit.junit.xml --coverage-clover=./var/phpunit/coverage/clover/lib-postgresql-migrations-unit.coverage.xml",
385+
"tools/phpunit/vendor/bin/phpunit --testsuite=lib-postgresql-migrations-integration --log-junit ./var/phpunit/logs/lib-postgresql-migrations-integration.junit.xml --coverage-clover=./var/phpunit/coverage/clover/lib-postgresql-migrations-integration.coverage.xml"
386+
],
374387
"test:bridge:filesystem-azure": [
375388
"tools/phpunit/vendor/bin/phpunit --testsuite=bridge-filesystem-azure-unit --log-junit ./var/phpunit/logs/bridge-filesystem-azure-unit.junit.xml --coverage-clover=./var/phpunit/coverage/clover/bridge-filesystem-azure-unit.coverage.xml",
376389
"tools/phpunit/vendor/bin/phpunit --testsuite=bridge-filesystem-azure-integration --log-junit ./var/phpunit/logs/bridge-filesystem-azure-integration.junit.xml --coverage-clover=./var/phpunit/coverage/clover/bridge-filesystem-azure-integration.coverage.xml"

0 commit comments

Comments
 (0)