Skip to content

fix: migration and theme layout issues #218

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

ibnsultan
Copy link
Contributor

@ibnsultan ibnsultan commented Mar 28, 2025

fix: migration and theme layout issues

What kind of change does this PR introduce? (pls check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe below

Description

Issue 1

Since the users and roles tables are referenced by other tables, directly deleting their data results in a fatal error. This occurs because most db engines, by default, enforce constraint checks to maintain referential integrity.

To resolve this, I've disabled foreign key checks before truncating the tables. This allows to clear the data without encountering errors related to foreign key constraints.

Issue 2

added content x-app.container-full since there was no associated markup with it

Issue 3

  1. In x-app.heading it doesn't make sense to use null coalescing (??) for the same values that are already defined in @props.

Why?

  • The @props directive already ensures that $title and $description have default values (" empty string in this case).
  • Using {{ $title ?? '' }} is redundant because $title can never be null—it’s always at least an empty string.
  1. Added the capability to add slots to the x-app.heading, the slot can also be dynamically toggled to allows it's elements to be accessed via a dropdown on mobile devices or smaller screens, ensuring a clean and intuitive UI.

Other Suggestions

Use the truncate method instead of delete for the seeders to cleer all records in the tables. The truncate method is more efficient for this purpose, as it doesn't log individual row deletions and can be faster than a standard delete operation and autoincrement is reset, which is not the case with delete.

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

cc @bobbyiliev

@ibnsultan ibnsultan changed the title fix: truncate table without constraint check fix: migration and theme layout issues Mar 31, 2025
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.

1 participant