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

Snapshot file not empty in new project without any changes #8318

Closed
3 tasks done
paescuj opened this issue Sep 25, 2021 · 0 comments · Fixed by #8351
Closed
3 tasks done

Snapshot file not empty in new project without any changes #8318

paescuj opened this issue Sep 25, 2021 · 0 comments · Fixed by #8351
Assignees
Labels
Milestone

Comments

@paescuj
Copy link
Member

paescuj commented Sep 25, 2021

Preflight Checklist

Describe the Bug

The snapshot file (created via npx directus schema snapshot ./snapshot.yaml) contains information (namely about directus_dashboards, directus_panels, directus_settings) in new projects where no changes have been made yet.

Example:

version: 1
directus: 9.0.0-rc.94
collections:
  - collection: directus_dashboards
    meta: null
    schema:
      name: directus_dashboards
      schema: public
      comment: null
  - collection: directus_panels
    meta: null
    schema:
      name: directus_panels
      schema: public
      comment: null

[...]

relations:
  - collection: directus_settings
    field: storage_default_folder
    related_collection: directus_folders
    schema:
      table: directus_settings
      column: storage_default_folder
      foreign_key_table: directus_folders
      foreign_key_column: id
      foreign_key_schema: public
      constraint_name: directus_settings_storage_default_folder_foreign
      on_update: NO ACTION
      on_delete: SET NULL

I think it's because those collections, fields & relations are missing in system-data, right?

To Reproduce

  1. Create a new Directus project
  2. Run npx directus schema snapshot ./snapshot.yaml
  3. Inspect snapshot file

What version of Directus are you using?

v9.0.0-rc.94

What version of Node.js are you using?

Docker Image

What database are you using?

Postgres 13

What browser are you using?

Firefox

What operating system are you using?

macOS

How are you deploying Directus?

Docker

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

Successfully merging a pull request may close this issue.

2 participants