Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Adding database table name prefix support#1064

Open
egaudrain wants to merge 1 commit into
Attendize:developAttendize/Attendize:developfrom
egaudrain:db_prefixegaudrain/Attendize:db_prefixCopy head branch name to clipboard
Open

Adding database table name prefix support#1064
egaudrain wants to merge 1 commit into
Attendize:developAttendize/Attendize:developfrom
egaudrain:db_prefixegaudrain/Attendize:db_prefixCopy head branch name to clipboard

Conversation

@egaudrain

Copy link
Copy Markdown
Contributor

Table prefixes are important for managed hosts where creating a database for Attendize may not be possible.

I added an option in the .env file and declared the prefix in config/database.php. However, because MyBaseModel.php is using a raw query, the prefix is not taken into account. The proposed fixed is a bit ugly. It would probably be better to either not use a raw query, or at least to get the prefix from the Lavarel database instance... but I'm not familiar enough with this framework to pull this.

Also note that I entered attendize_ as default prefix in .env.example, but use an empty string '' in config/database.php. I think this is consistent, because keeping an empty entry in the example file would not be very self-explanatory, but this may not be consistent with what has been done for other options.

Prefix is important for managed hosts where creating a database for Attendize may not be possible.
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.