GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Simplify API's data model - site structure should be identical in draft and published · Issue #167 · unikent/astro

Simplify API's data model - site structure should be identical in draft and published #167

New issue
Copy link
New issue
Copy link
Open
Open
Simplify API's data model - site structure should be identical in draft and published#167
Copy link
Labels
Needs Refactoring

Description

@sy238-unikent
sy238-unikent
opened on Nov 23, 2017
Issue body actions

Our decision to make structural changes to pages (moves, renames, deletes) propagate automatically between draft and published versions of a site allows us to simplify the data model as we no longer need two versions of the site hierarchy (one draft, one published).

We would lose the ability to easily implement the (not requested or implemented) functionality of having "snapshots" or different versions of a site - although this could be implemented in other ways if desired.

Options include:

  1. Adding draft_revision_id and published_revision_id fields to the pages table, directly referencing the current draft and published (if present) revisions for a page.

This would be the simplest method, as determining page status can be done from the data within the page table.

  1. Adding a page_versions table with page_id, revision_id and version fields.

If (page_id, version) was a unique index, (so only current draft or published revision is recorded) then retrieving the status of a page would require simple joins.

This would be more complex to implement but leaves open the ability to have different "versions" of a page in the future.

Activity

  1. sy238-unikent
    added
    question
    on Nov 23, 2017
  2. samyapp commented on Dec 7, 2017

    @samyapp
    samyapp
    on Dec 7, 2017
    Contributor
    More actions

    Following discussions with @jtisqo, @christiancable and @hk284-unikent we will refactor to option (1) above.

    We will change revision_id in pages table to draft_revision_id and add a published_revision_id field.

  3. samyapp
    added
    Needs Refactoring
    and removed
    question
    on Dec 8, 2017
  4. samyapp
    changed the title [-]Should API's data model be refactored to simplify it?[/-] [+]Simplify API's data model - site structure should be identical in draft and published[/+] on Dec 8, 2017
  5. samyapp commented on Dec 8, 2017

    @samyapp
    samyapp
    on Dec 8, 2017
    Contributor
    More actions

    Requires broader test coverage before it is worth risking this. See #203

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs Refactoring

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402792 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.