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

Improve Page data table schemas #367

Merged
merged 14 commits into from
Oct 29, 2024
Merged

Conversation

Adammatthiesen
Copy link
Member

This pull request includes significant enhancements to the StudioCMS database schema and WordPress API importer functionality. The key changes introduce new tables for categories and tags, extend the site configuration, and improve the import process to handle these new entities.

Database Schema Updates:

  • packages/studiocms_core/src/db/config.ts:

    • Added StudioCMSPageDataCategories and StudioCMSPageDataTags to the database configuration. [1] [2]
  • packages/studiocms_core/src/db/tables.ts:

    • Defined new tables StudioCMSPageDataCategories and StudioCMSPageDataTags with appropriate columns. [1] [2]
  • packages/studiocms_core/src/db/tsTables.ts:

    • Exported TypeSafe Table definitions for StudioCMSPageDataCategories and StudioCMSPageDataTags. [1] [2]

WordPress API Importer Enhancements:

  • packages/studiocms_devapps/src/apps/wp-importer.ts:

    • Added an option to import site settings from WordPress, which will override the StudioCMS site configuration.
  • packages/studiocms_devapps/src/routes/wp-api-importer.ts:

    • Added import functionality for site settings from WordPress API. [1] [2]
  • packages/studiocms_devapps/src/schema/wp-api/index.ts:

    • Added schemas for Tag, Category, and SiteSettings to handle new data structures.
  • packages/studiocms_devapps/src/utils/wp-api/converters.ts:

    • Implemented functions to generate and insert categories and tags into the database. [1] [2] [3]
  • packages/studiocms_devapps/src/utils/wp-api/index.ts:

    • Extended import functions to handle categories, tags, and site settings. [1] [2] [3] [4]
  • packages/studiocms_devapps/src/utils/wp-api/utils.ts:

    • Updated apiEndpoint function to support new endpoint types for categories, tags, and settings. [1] [2]

Copy link

changeset-bot bot commented Oct 27, 2024

🦋 Changeset detected

Latest commit: 8183337

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@studiocms/devapps Patch
@studiocms/core Patch
studiocms Patch
@studiocms/auth Patch
@studiocms/betaresources Patch
@studiocms/blog Patch
@studiocms/dashboard Patch
@studiocms/frontend Patch
@studiocms/imagehandler Patch
@studiocms/renderers Patch
@studiocms/assets Patch
@studiocms/robotstxt Patch
@studiocms/ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@studiocms-no-reply
Copy link
Member

Thank you for submitting your Pull Request, the following links will become available for preview shortly:

Base automatically changed from update/imagehandler to issue-0304 October 27, 2024 12:24
@Adammatthiesen Adammatthiesen marked this pull request as ready for review October 27, 2024 12:29
Copy link
Member

@jdtjenkins jdtjenkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🔥

Copy link
Member

@dreyfus92 dreyfus92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🫡

@Adammatthiesen Adammatthiesen merged commit f0d60a7 into issue-0304 Oct 29, 2024
1 check passed
@Adammatthiesen Adammatthiesen deleted the update/table-schema branch October 29, 2024 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants