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

Feature Request:- cloning of projects, databases and collections #42

Open
rohankm opened this issue Jul 6, 2022 · 1 comment
Open

Comments

@rohankm
Copy link

rohankm commented Jul 6, 2022

Adding more user/developer-friendly functions like cloning would be helpful

The current approach for cloning a project is is

  1. init the database
  2. init the collection
  3. create a new project
  4. manually edit the project id and project name inside appwrite.json to the new project
  5. deploy the collection

which a beginner developer might feel overhead..

what I suggest is a simple clone feature which can clone projects, databases and collections... This can be implemented as

appwrite clone --projectId myProject --cloneProjectId myProjectClone --cloneProjectName MyprojectClone

@codercatdev
Copy link

Love this, I was just running into this myself! I like creating projectId same as projectName most of the time.

My expecation of running appwrite deploy collection would offer to create project, then offer to create db as well.

{
    "projectId": "dubstep-stack",
    "projectName": "dubstep-stack",
    "collections": [
        {
            "$id": "notes",
            "$createdAt": "2022-10-14T11:24:26.880+00:00",
            "$updatedAt": "2022-10-14T11:24:39.876+00:00",
            "$permissions": [],
            "databaseId": "dubstep-stack-db",
            "name": "notes",
            "enabled": true,
            "documentSecurity": true,
            "attributes": [
                {
                    "key": "title",
                    "type": "string",
                    "status": "available",
                    "required": true,
                    "array": false,
                    "size": 255,
                    "default": null
                },
                {
                    "key": "body",
                    "type": "string",
                    "status": "available",
                    "required": false,
                    "array": false,
                    "size": 65535,
                    "default": null
                },
                {
                    "key": "profile_id",
                    "type": "string",
                    "status": "available",
                    "required": true,
                    "array": false,
                    "size": 16,
                    "default": null
                }
            ],
            "indexes": []
        }
    ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants