diff --git a/README-CN.md b/README-CN.md index 6f00cebf10..18b7e2715c 100644 --- a/README-CN.md +++ b/README-CN.md @@ -64,7 +64,7 @@ docker run -it --rm \ --volume /var/run/docker.sock:/var/run/docker.sock \ --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \ --entrypoint="install" \ - appwrite/appwrite:1.1.2 + appwrite/appwrite:1.2.0 ``` ### Windows @@ -76,7 +76,7 @@ docker run -it --rm ^ --volume //var/run/docker.sock:/var/run/docker.sock ^ --volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^ --entrypoint="install" ^ - appwrite/appwrite:1.1.2 + appwrite/appwrite:1.2.0 ``` #### PowerShell @@ -86,7 +86,7 @@ docker run -it --rm , --volume /var/run/docker.sock:/var/run/docker.sock , --volume ${pwd}/appwrite:/usr/src/code/appwrite:rw , --entrypoint="install" , - appwrite/appwrite:1.1.2 + appwrite/appwrite:1.2.0 ``` 运行后,可以在浏览器上访问 http://localhost 找到 Appwrite 控制台。在非 Linux 的本机主机上完成安装后,服务器可能需要几分钟才能启动。 diff --git a/README.md b/README.md index 0e613204c4..f0cbc567ce 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ docker run -it --rm \ --volume /var/run/docker.sock:/var/run/docker.sock \ --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \ --entrypoint="install" \ - appwrite/appwrite:1.1.2 + appwrite/appwrite:1.2.0 ``` ### Windows @@ -87,7 +87,7 @@ docker run -it --rm ^ --volume //var/run/docker.sock:/var/run/docker.sock ^ --volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^ --entrypoint="install" ^ - appwrite/appwrite:1.1.2 + appwrite/appwrite:1.2.0 ``` #### PowerShell @@ -97,7 +97,7 @@ docker run -it --rm ` --volume /var/run/docker.sock:/var/run/docker.sock ` --volume ${pwd}/appwrite:/usr/src/code/appwrite:rw ` --entrypoint="install" ` - appwrite/appwrite:1.1.2 + appwrite/appwrite:1.2.0 ``` Once the Docker installation completes, go to http://localhost to access the Appwrite console from your browser. Please note that on non-Linux native hosts, the server might take a few minutes to start after installation completes. diff --git a/SECURITY.md b/SECURITY.md index a40ca1e3f9..d4addecf80 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -8,6 +8,7 @@ | 1.15.x | :white_check_mark: | | 1.0.x | :white_check_mark: | | 1.1.x | :white_check_mark: | +| 1.2.x | :white_check_mark: | ## Reporting a Vulnerability diff --git a/src/Appwrite/Migration/Migration.php b/src/Appwrite/Migration/Migration.php index bef6e5e603..b764641279 100644 --- a/src/Appwrite/Migration/Migration.php +++ b/src/Appwrite/Migration/Migration.php @@ -48,6 +48,7 @@ abstract class Migration '1.1.0' => 'V16', '1.1.1' => 'V16', '1.1.2' => 'V16', + '1.2.0' => 'V17', ]; /** diff --git a/src/Appwrite/Migration/Version/V17.php b/src/Appwrite/Migration/Version/V17.php new file mode 100644 index 0000000000..41ae47cb80 --- /dev/null +++ b/src/Appwrite/Migration/Version/V17.php @@ -0,0 +1,74 @@ + null, + fn () => [] + ); + } + + Console::log('Migrating Project: ' . $this->project->getAttribute('name') . ' (' . $this->project->getId() . ')'); + + Console::info('Migrating Collections'); + $this->migrateCollections(); + + Console::info('Migrating Documents'); + $this->forEachDocument([$this, 'fixDocument']); + } + + /** + * Migrate all Collections. + * + * @return void + */ + protected function migrateCollections(): void + { + foreach ($this->collections as $collection) { + $id = $collection['$id']; + + Console::log("Migrating Collection \"{$id}\""); + + $this->projectDB->setNamespace("_{$this->project->getInternalId()}"); + + switch ($id) { + default: + break; + } + + usleep(50000); + } + } + + /** + * Fix run on each document + * + * @param \Utopia\Database\Document $document + * @return \Utopia\Database\Document + */ + protected function fixDocument(Document $document) + { + switch ($document->getCollection()) { + default: + break; + } + + return $document; + } +}