Skip to content
This repository was archived by the owner on Dec 17, 2019. It is now read-only.
This repository was archived by the owner on Dec 17, 2019. It is now read-only.

Figure out a strategy to not recreate unpublished projects that were previously published #199

@gideonthomas

Description

@gideonthomas

We want the published id to be the same for a specific project, regardless of how many cycles of publish/unpublish it undergoes.
Discussion started here: https://github.com/mozilla/thimble.webmaker.org/issues/1280

This is possibly doable; we just need to figure out the best way to do it. One possible solution is to:

  • Add a new column to the publishedProjects table that indicates the current status of a project viz. published or unpublished
  • When we publish a project for the first time, it creates a new publishedProjects entry (as it already does) and marks it as published, creates the corresponding publishedFiles (as it already does), and uploads to S3 (as it already does)
  • If you unpublish that project, first, it is taken down from S3 (as it already does), then the corresponding publishedFiles records should be deleted (as it already does), and finally, the corresponding publishedProjects entry in the db should be marked as unpublished.
  • if you delete the project, it can delete the publishedProjects entry
  • if you republish the project, it will just flip the published flag, copy the files into publishedFiles (as it already does), and upload to S3 (as it already does).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions