Unifiedtransform icon indicating copy to clipboard operation
Unifiedtransform copied to clipboard

Fix/fix permissions tables migration - guard_name and name

Open Katumbela opened this issue 6 months ago • 0 comments

This pull request introduces several changes to improve application configuration, database schema compatibility, and code readability. The key updates include adding a new .env file, modifying database connection settings, setting a default string length for database columns, and adjusting schema definitions for better compatibility with MySQL 8.0.

Environment Configuration:

  • Added a new .env file with default application and database configuration values, such as APP_NAME, DB_CONNECTION, and MAIL_MAILER. This file provides a local environment setup template.
  • Updated .env.example to align database host and credentials with the new .env file, replacing DB_HOST=db with DB_HOST=127.0.0.1 and setting DB_USERNAME to root with an empty password.

Database Schema Compatibility:

  • Updated AppServiceProvider to set a default string length of 191 for database columns, ensuring compatibility with older MySQL versions. [1] [2]
  • Adjusted the length of name and guard_name columns in the permissions and roles tables to 125 characters for compatibility with MySQL 8.0.

Code Readability:

  • Reformatted primary key definitions in create_permission_tables.php migrations for improved readability by breaking long lines into multiple lines. [1] [2]

Katumbela avatar May 13 '25 16:05 Katumbela