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
Replace page
column on posts
table with type
column
#10922
Comments
@gargol Would be cool if you could give the checkboxes here a once over to confirm it makes sense |
@allouis the plan looks 👌 Just to expand the topic on serialization level. In v2 I see a pretty straight forward solution modifying the input serializer to fit the new model. Guess the bigger deal will be fitting the new field with v01 controllers 🤔 Also as for model layer changes, it would need a little more details on the approach. Is it going to be something similar to |
👍 I think both input & output serialiser would need to be changed right? because the v2 api outputs the As for model layer changes - I was thinking that it would just be replacing the |
Yup 👍
Yes, this is true and I don't think it's worth an effort just to be "clean" in respect of model separation. Changing existing |
Awesome - I agree 💃 |
refs TryGhost#10922 The frontend UrlGenerator parses the filters itself rather than passing to the api, so we need to replicate the conversion from page -> type
refs #10922 The frontend UrlGenerator parses the filters itself rather than passing to the api, so we need to replicate the conversion from page -> type
refs #10922 * Updated canary api to handle type column correctly * Updated unit tests * Updated regression tests
refs TryGhost#10922 - adds migrations to... 1. add `post.type` column 2. populate `post.type` column based on `post.page` value 3. drop `post.page` column - updates all code paths to work with `post.type` in place of `post.page` - adds `nql-map-key-values` transformer for mapping `page`->`type` in `filter` params when using the v2 API - modifies importer to handle `post.page`->`post.type` transformation when importing older export files
refs #10922 - adds migrations to... 1. add `post.type` column 2. populate `post.type` column based on `post.page` value 3. drop `post.page` column - updates all code paths to work with `post.type` in place of `post.page` - adds `nql-map-key-values` transformer for mapping `page`->`type` in `filter` params when using the v2 API - modifies importer to handle `post.page`->`post.type` transformation when importing older export files
refs TryGhost/Ghost#10922 - adds migrations to... 1. add `post.type` column 2. populate `post.type` column based on `post.page` value 3. drop `post.page` column - updates all code paths to work with `post.type` in place of `post.page` - adds `nql-map-key-values` transformer for mapping `page`->`type` in `filter` params when using the v2 API - modifies importer to handle `post.page`->`post.type` transformation when importing older export files
refs TryGhost/Ghost#10922 - adds migrations to... 1. add `post.type` column 2. populate `post.type` column based on `post.page` value 3. drop `post.page` column - updates all code paths to work with `post.type` in place of `post.page` - adds `nql-map-key-values` transformer for mapping `page`->`type` in `filter` params when using the v2 API - modifies importer to handle `post.page`->`post.type` transformation when importing older export files
refs TryGhost/Ghost#10922 - adds migrations to... 1. add `post.type` column 2. populate `post.type` column based on `post.page` value 3. drop `post.page` column - updates all code paths to work with `post.type` in place of `post.page` - adds `nql-map-key-values` transformer for mapping `page`->`type` in `filter` params when using the v2 API - modifies importer to handle `post.page`->`post.type` transformation when importing older export files
refs TryGhost/Ghost#10922 - adds migrations to... 1. add `post.type` column 2. populate `post.type` column based on `post.page` value 3. drop `post.page` column - updates all code paths to work with `post.type` in place of `post.page` - adds `nql-map-key-values` transformer for mapping `page`->`type` in `filter` params when using the v2 API - modifies importer to handle `post.page`->`post.type` transformation when importing older export files
refs TryGhost/Toolbox#332 refs TryGhost#10922 - The "page" attirbute has been deprecated long time ago and was kept around in the output for back compatibility reasons. With Ghost 5.0 there's no longer need to return this field or keep around any of the code supporting "page" attribute processing
closes TryGhost/Toolbox#332 refs TryGhost#10922 - The "page" attirbute has been deprecated long time ago and was kept around in the output for back compatibility reasons. With Ghost 5.0 there's no longer need to return this field or keep around any of the code supporting "page" attribute processing
refs TryGhost/Toolbox#332 refs #10922 - The "page" attirbute has been deprecated long time ago and was kept around in the output for back compatibility reasons. With Ghost 5.0 there's no longer need to return this field or keep around any of the code supporting "page" attribute processing
closes TryGhost/Toolbox#332 refs #10922 - The "page" attirbute has been deprecated long time ago and was kept around in the output for back compatibility reasons. With Ghost 5.0 there's no longer need to return this field or keep around any of the code supporting "page" attribute processing
Currently we have a
page
column which is a non-nullable boolean column which defaults tofalse
We want to replace this column with a
type
column,non-nullable string which defaults to
'post'
and has validations to ensure it is obly ever set to'page'
or'post'
page
column from schematype
column to schemapage
->type
columnpage
columnThe text was updated successfully, but these errors were encountered: