0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-03 23:00:14 -05:00
ghost/core/server
Rishabh Garg 8ec12d9eee
🏗 Extracted post metadata in new post_meta table (#11102)
NOTE: The post metadata table split is purely an internal optimization for v3 and doesn't require or expect any external actions including related API usage in v3

We keep running into issues adding new fields to the post table because there are too many fields making the post table "too wide". We have also hit MySQL limitations in how many bytes can be in a row (64kb) with post table.

In v3, we decided to split the 8 post fields (meta, twitter and og) used for meta data into a posts_meta table as these 8 fields are all "problem" `varchar` fields and make sense logically grouped together. The API layer is unaffected by the split as input/output serializers ensure the data flow works the same way as it was in v2. Only thing to note is json export in v3 will have slightly different structure with posts meta fields as separate.

- Creates new post_meta schema/table with 8 fields (2 meta_* , 3 twitter_* and 3 og_*)
- Update relations between post and post_meta table
- Update input/output serializers to keep existing API behavior
- Avoids new entry in post_meta table for post where all meta fields are null
- Keeps the current fields API param behavior
- Handles migration of existing posts to new table structure
- Updates importer/exporter to work seamlessly with table changes
2019-09-16 14:15:55 +05:30
..
adapters Fixed lint rule 2019-09-11 18:37:30 +02:00
api 🏗 Extracted post metadata in new post_meta table (#11102) 2019-09-16 14:15:55 +05:30
config 🔒 Added admin:redirects config option for disabling admin redirects 2019-09-12 12:40:12 +01:00
data 🏗 Extracted post metadata in new post_meta table (#11102) 2019-09-16 14:15:55 +05:30
lib 🔥 Removed v0.1 controllers & routes (#11103) 2019-09-11 19:10:10 +02:00
models 🏗 Extracted post metadata in new post_meta table (#11102) 2019-09-16 14:15:55 +05:30
public Merge branch 'master' into v3 2019-09-16 09:32:10 +01:00
services Merge branch 'master' into v3 2019-09-16 09:32:10 +01:00
translations Removed all clients and client_trusted_domains related code 2019-09-12 15:09:49 +01:00
views Update default 404 page 2019-07-15 14:47:01 +02:00
web Reworded confusing comment mentioning v0.1 2019-09-12 19:17:35 +02:00
analytics-events.js Added event to integrations when created (#10588) 2019-03-11 15:28:17 +01:00
ghost-server.js Update Test & linting packages (major) (#10858) 2019-07-05 13:40:43 +02:00
index.js 🔥 Removed v0.1 auth services (#11104) 2019-09-11 19:40:48 +02:00
overrides.js Disabled bluebird debug logs 2018-08-13 14:01:31 +02:00
update-check.js Updated links to docs (#10941) 2019-07-22 18:17:50 +08:00