Unifiedtransform
Unifiedtransform copied to clipboard
Fix/fix permissions tables migration - guard_name and name
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
.envfile with default application and database configuration values, such asAPP_NAME,DB_CONNECTION, andMAIL_MAILER. This file provides a local environment setup template. - Updated
.env.exampleto align database host and credentials with the new.envfile, replacingDB_HOST=dbwithDB_HOST=127.0.0.1and settingDB_USERNAMEtorootwith an empty password.
Database Schema Compatibility:
- Updated
AppServiceProviderto set a default string length of 191 for database columns, ensuring compatibility with older MySQL versions. [1] [2] - Adjusted the length of
nameandguard_namecolumns in thepermissionsandrolestables to 125 characters for compatibility with MySQL 8.0.
Code Readability:
- Reformatted primary key definitions in
create_permission_tables.phpmigrations for improved readability by breaking long lines into multiple lines. [1] [2]