Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backups #27

Merged
merged 199 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
199 commits
Select commit Hold shift + click to select a range
86a5f68
first commit
shimonewman Mar 8, 2024
f2272c3
first commit
shimonewman Mar 9, 2024
22e4562
first commit
shimonewman Mar 9, 2024
7249f59
first commit
shimonewman Mar 9, 2024
952dfd1
first commit
shimonewman Mar 9, 2024
cfb6784
first commit
shimonewman Mar 9, 2024
73a4e22
first commit
shimonewman Mar 9, 2024
01a9898
first commit
shimonewman Mar 9, 2024
55ba508
first commit
shimonewman Mar 9, 2024
25eeaba
first commit
shimonewman Mar 9, 2024
1102e05
first commit
shimonewman Mar 9, 2024
dacd208
first commit
shimonewman Mar 9, 2024
c4f1bca
first commit
shimonewman Mar 9, 2024
bed9202
first commit
shimonewman Mar 9, 2024
58fae28
first commit
shimonewman Mar 9, 2024
9c0df43
first commit
shimonewman Mar 9, 2024
24a3d6f
first commit
shimonewman Mar 9, 2024
ae67360
tar
fogelito Mar 9, 2024
da9f8bc
Merge remote-tracking branch 'origin/backups' into backups
fogelito Mar 9, 2024
dc7cb12
first commit
shimonewman Mar 9, 2024
013bc8d
Merge remote-tracking branch 'origin/backups' into backups
shimonewman Mar 9, 2024
53f94c4
local path
shimonewman Mar 10, 2024
5c6d508
upload
fogelito Mar 10, 2024
7a2cec7
dsn
fogelito Mar 10, 2024
badd6d4
update
shimonewman Mar 10, 2024
811dab1
Merge remote-tracking branch 'origin/backups' into backups
shimonewman Mar 10, 2024
f87e483
filesize
fogelito Mar 10, 2024
a208e42
Merge remote-tracking branch 'origin/backups' into backups
fogelito Mar 10, 2024
9861173
cli version
fogelito Mar 10, 2024
dc3fe12
update
shimonewman Mar 11, 2024
f16b984
Merge remote-tracking branch 'origin/backups' into backups
shimonewman Mar 11, 2024
aabe9a1
init & shutDown
fogelito Mar 20, 2024
d7d4dc9
Pull main
fogelito Mar 21, 2024
317d8f1
Client
fogelito Mar 21, 2024
df296cf
Client
fogelito Mar 21, 2024
99c7398
Bumb utopia-php/database
fogelito May 21, 2024
d2fd806
Merge remote-tracking branch 'origin/main' into backups
abnegate May 24, 2024
0b02c19
Update resource serialization
abnegate May 24, 2024
d6be56c
Add pint rules
abnegate May 24, 2024
52f48b9
Update to PHP 8.3
abnegate May 24, 2024
af18587
Add extension refs
abnegate May 24, 2024
fe480c8
Add PHPStan
abnegate May 24, 2024
9017a1e
Update docker
abnegate May 24, 2024
56b9f44
Migrate phpunit
abnegate May 24, 2024
1b0feb4
Stan fixes
abnegate May 24, 2024
291c027
Remove primitive
fogelito May 27, 2024
8de76fd
+ updateLimits
fogelito Jun 2, 2024
b37911e
add hint
fogelito Jun 2, 2024
1de3ba4
Questions
fogelito Jun 2, 2024
cf4c648
extractServices
fogelito Jun 17, 2024
ce55838
make it static
fogelito Jun 17, 2024
84418d4
Source DBG's
fogelito Jun 23, 2024
9dbd7c1
Source DBG's
fogelito Jun 23, 2024
80c56b5
Question
fogelito Jun 23, 2024
bf262a7
Question
fogelito Jun 23, 2024
4b831e6
Question
fogelito Jun 23, 2024
351a830
Appwrite import
fogelito Jun 23, 2024
71fd8b8
Question?
fogelito Jun 23, 2024
06a3277
Create Database
fogelito Jun 23, 2024
23553bc
importDatabaseResource
fogelito Jun 23, 2024
fdddb5f
dbgs
fogelito Jun 23, 2024
89a7be3
Do we need to check API response codes?
fogelito Jun 23, 2024
cc62475
Remove comment
fogelito Jun 23, 2024
397c94c
jsonSerialize Collection add id
fogelito Jun 24, 2024
13448d1
lowercase
fogelito Jun 25, 2024
0cc2ef8
Revert names
fogelito Jun 25, 2024
1fd7e1a
null defaults
fogelito Jun 25, 2024
e031a47
add comment createFloatAttribute
fogelito Jun 25, 2024
3e452f4
appwrite/appwrite 11.1.*
fogelito Jun 26, 2024
2b491d5
Move shutdown to target
fogelito Jun 26, 2024
48e8749
Use Id's
fogelito Jun 26, 2024
ff7f50b
Question
fogelito Jun 26, 2024
72b5832
IndexType
fogelito Jun 27, 2024
66f26dc
Remove getDatabase
fogelito Jun 27, 2024
80d03a6
Add id to Index.php
fogelito Jun 27, 2024
d253dbd
Compression storage type
fogelito Jun 30, 2024
375ccd3
Change dbg
fogelito Jul 1, 2024
8121117
Fix Runtime Enums
fogelito Jul 3, 2024
59f9ba1
Add hyphen
fogelito Jul 3, 2024
9b2da83
Fix $end
fogelito Jul 3, 2024
25d4726
Add original id
fogelito Jul 4, 2024
f284e65
Add function entrypoint
fogelito Jul 4, 2024
d4c5aed
Add create entrypoint
fogelito Jul 4, 2024
6309549
Remove dbg
fogelito Jul 9, 2024
64e4ffb
Relationships Enums
fogelito Jul 9, 2024
b5b4fcf
Debug info
fogelito Jul 9, 2024
39f99bd
Datetime resource
fogelito Jul 9, 2024
5574eca
Datetime resource
fogelito Jul 9, 2024
1b42474
Fix datetime
fogelito Jul 9, 2024
50b57b8
Do we have Datetime format?
fogelito Jul 10, 2024
1b0f2de
exportDocuments Appwrite
fogelito Jul 14, 2024
2e69fbc
Revert playground.php
fogelito Jul 14, 2024
9635d26
Add select query
fogelito Jul 14, 2024
8e0e95d
Remove dates
fogelito Jul 14, 2024
76cc276
stripMetadata
fogelito Jul 15, 2024
a416b4d
add $updatedAt $createdAt
fogelito Jul 15, 2024
6f9c627
Implement Single Resource Migration
PineappleIOnic Jul 15, 2024
9e5b81e
Run Linter
PineappleIOnic Jul 15, 2024
89b30ce
Fix Tests
PineappleIOnic Jul 15, 2024
365a22a
Remove strip function
fogelito Jul 15, 2024
647d52a
No clonings
fogelito Jul 15, 2024
8a0d3ef
line
fogelito Jul 15, 2024
0050843
Merge branch 'backups' into feat-backups-impl-single-resource
PineappleIOnic Jul 15, 2024
9625740
Run Linter
PineappleIOnic Jul 15, 2024
a7dc26f
Merge pull request #36 from utopia-php/feat-backups-impl-single-resource
PineappleIOnic Jul 15, 2024
ec38e46
Convert null to empty string
fogelito Jul 15, 2024
0d8df05
Sync main
abnegate Jul 16, 2024
f43269e
Fix stan
abnegate Jul 16, 2024
93a9a40
Fix Test Imports
PineappleIOnic Jul 16, 2024
f38c17a
Fix Tests, update to new error reporting method
PineappleIOnic Jul 16, 2024
ba73eeb
Update SupabaseTest.php
PineappleIOnic Jul 16, 2024
1f51c29
rootResourceId Query
fogelito Jul 16, 2024
140962f
rootResourceId try again
fogelito Jul 16, 2024
4edd51d
Add query rootResourceId
fogelito Jul 16, 2024
614922b
Many2Many
fogelito Jul 18, 2024
2d56af3
Change name
fogelito Jul 18, 2024
514395f
Remove dbg
fogelito Jul 18, 2024
c1e6427
Use relation side VS twoWay
fogelito Jul 21, 2024
d63024c
Fix no length
fogelito Jul 21, 2024
7b2e974
Add x-appwrite-preserve-dates header
fogelito Jul 22, 2024
266fe20
Merge remote-tracking branch 'origin/main' into backups
abnegate Jul 24, 2024
a8e143f
Update Appwrite destination database resources to use database librar…
abnegate Jul 24, 2024
cb766ab
Merge remote-tracking branch 'origin/sync-main' into backups
abnegate Jul 25, 2024
1a3eaa5
Fix array check
abnegate Jul 25, 2024
c47a3e7
Pretty print errors
abnegate Jul 25, 2024
3668d07
Fix phpunit deprecation warnings
abnegate Jul 25, 2024
2b26610
Pass collection structure only instead of all
abnegate Jul 25, 2024
2745920
Fix imports
abnegate Jul 25, 2024
8841ae3
Update test CLI to pass db + structure to Appwrite destination
abnegate Jul 25, 2024
589cdf1
Remove redundant file
abnegate Jul 25, 2024
c87c834
Remove var dumps
abnegate Jul 25, 2024
da27599
Print with previous as trace
abnegate Jul 25, 2024
b55d938
Add indexes to structure
abnegate Jul 25, 2024
320d8a5
Use const array for structure
abnegate Jul 25, 2024
325af19
Init db method
abnegate Jul 25, 2024
d451071
Add required subQueries
abnegate Jul 25, 2024
bf80258
Add required filters
abnegate Jul 25, 2024
5315709
Skip auth for CLI test
abnegate Jul 25, 2024
3e82be8
getResourceId fix for null
fogelito Jul 25, 2024
ab46162
Fix property order
abnegate Jul 25, 2024
ff6f85e
Fix two way attribute default status
abnegate Jul 25, 2024
2f32eb7
Fix import
abnegate Jul 25, 2024
d9e3ec1
Merge branch 'backups' of github.com:utopia-php/migration into backups
abnegate Jul 25, 2024
3db950c
Fix missing imports
abnegate Jul 26, 2024
cb0b1d2
Fix missing PDO options
abnegate Jul 26, 2024
0faac91
Force side parent
abnegate Jul 26, 2024
987efd4
Clear cache early
abnegate Jul 26, 2024
aab670c
Fix duplicate key because of remapping twoWayKey
abnegate Jul 26, 2024
bf5c8a8
Throw on attribute creation failure
abnegate Jul 26, 2024
1bdb6f0
Fix collection ID and buffer clear
abnegate Jul 26, 2024
4f6fe23
Options as reference
abnegate Jul 26, 2024
2c9e667
Update database
abnegate Jul 26, 2024
452f37a
Fix two way delete check
abnegate Jul 26, 2024
f8c4c19
Change Collection resource getInternalId
fogelito Jul 28, 2024
6d3d198
Attribute source types
fogelito Jul 28, 2024
4b67ad5
createDocument $databaseInternalId
fogelito Jul 28, 2024
a1ce44d
Fix getType INTEGER
fogelito Jul 28, 2024
d28841f
setPreserveDates
fogelito Jul 28, 2024
fe0e045
setPreserveDates
fogelito Jul 28, 2024
f349e72
Fix missing format on extended string attributes
abnegate Jul 29, 2024
697d51e
Fix size on extended string format
abnegate Jul 29, 2024
272485e
Fix size
fogelito Jul 29, 2024
bb2685e
Email size
fogelito Jul 29, 2024
ae26226
Fix email length
fogelito Jul 29, 2024
26af4f6
Fix float/int signed attribute
abnegate Jul 29, 2024
edbb61e
Fix integer size
abnegate Jul 29, 2024
caef939
Fix twoWayKey
fogelito Aug 1, 2024
4054978
Add catch createDocuments
fogelito Aug 1, 2024
2f54112
Revert
fogelito Aug 1, 2024
6644708
Parameterise batch size
abnegate Aug 5, 2024
9461883
getBatchSize
fogelito Aug 5, 2024
65add6a
allow nulls
fogelito Aug 5, 2024
8ccde49
allow nulls
fogelito Aug 5, 2024
44c8196
Stan fixes
abnegate Aug 6, 2024
b90f593
Merge branch 'backups' of github.com:utopia-php/migration into backups
abnegate Aug 6, 2024
de4c092
getBatchSize
fogelito Aug 6, 2024
ae6151e
Add rootResourceType
fogelito Aug 6, 2024
f524f51
$rootResourceType check
fogelito Aug 6, 2024
9088c29
Remove line
fogelito Aug 6, 2024
577ff40
Merge branch 'backups' of github.com:utopia-php/migration into backups
abnegate Aug 6, 2024
d130355
Add description Resource type
fogelito Aug 6, 2024
2591063
Merge remote-tracking branch 'origin/backups' into backups
fogelito Aug 6, 2024
5b79599
Add void
fogelito Aug 6, 2024
8b98bb4
Check $rootResources
fogelito Aug 6, 2024
7f8fc81
Check $rootResources
fogelito Aug 6, 2024
0fe0e9a
Check $rootResources
fogelito Aug 6, 2024
274115b
Add error hook
fogelito Aug 7, 2024
d579f34
Error no params
fogelito Aug 7, 2024
2bb9c1b
lint
fogelito Aug 20, 2024
0cbd135
Fix lint
abnegate Aug 22, 2024
0791f42
Fix tests
abnegate Aug 22, 2024
676600b
Update PHP version
abnegate Aug 22, 2024
9376205
Remove redundant header
abnegate Aug 22, 2024
e1c8752
Review
abnegate Aug 22, 2024
ea6529b
database 50
fogelito Aug 22, 2024
7fb2364
0.49 db
fogelito Aug 22, 2024
04ad7e4
database 50
fogelito Aug 22, 2024
0fc2234
back to 52
fogelito Aug 22, 2024
420cb3b
Remove var dump
abnegate Aug 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Tests
on:
pull_request:
push: { branches: [main] }
push:
branches:
- main

jobs:
tests:
Expand All @@ -12,8 +14,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Run Tests
run: |
docker-compose up -d --build && sleep 5 && docker compose exec tests php ./vendor/bin/phpunit
docker compose up -d --build
sleep 5
docker compose exec tests php vendor/bin/phpunit
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
composer.lock
/vendor/
/.idea/
*.cache
Expand Down
25 changes: 18 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,35 @@
FROM supabase/postgres:15.1.0.96 as supabase-db
FROM supabase/postgres:15.1.0.96 AS supabase-db

COPY tests/Migration/resources/supabase/1_globals.sql /docker-entrypoint-initdb.d/1_globals.sql
COPY tests/Migration/resources/supabase/2_main.sql /docker-entrypoint-initdb.d/2_main.sql

RUN rm -rf /docker-entrypoint-initdb.d/migrate.sh

FROM postgres:alpine3.18 as nhost-db
FROM postgres:alpine3.18 AS nhost-db

COPY tests/Migration/resources/nhost/1_globals.sql /docker-entrypoint-initdb.d/1_globals.sql
COPY tests/Migration/resources/nhost/2_main.sql /docker-entrypoint-initdb.d/2_main.sql

FROM composer:2.0 as composer
WORKDIR /usr/local/src/
COPY composer.json /usr/local/src/
FROM composer:2.0 AS composer

COPY composer.json /app
COPY composer.lock /app

RUN composer install --ignore-platform-reqs

FROM php:8.1.21-fpm-alpine3.18 as tests
FROM php:8.3.10-cli-alpine3.20 AS tests

# Postgres
RUN set -ex \
&& apk --no-cache add postgresql-libs postgresql-dev \
&& docker-php-ext-install pdo pdo_pgsql \
&& apk del postgresql-dev

COPY ./src /app/src
COPY ./tests /app/src/tests
COPY --from=composer /usr/local/src/vendor /app/vendor

COPY --from=composer /app/vendor /app/vendor

WORKDIR /app

CMD tail -f /dev/null
Loading
Loading