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

Officially support PostgreSQL database #1066

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

Conversation

lancepioch
Copy link
Member

No description provided.

@lancepioch lancepioch added ✨ feature New feature 🔴 hard Fairly difficult labels Mar 8, 2025
@lancepioch lancepioch self-assigned this Mar 8, 2025
@lancepioch lancepioch marked this pull request as ready for review March 8, 2025 23:11
@lancepioch lancepioch requested a review from a team as a code owner March 8, 2025 23:11
@lancepioch lancepioch requested a review from rmartinoscar March 8, 2025 23:11
@notAreYouScared
Copy link
Member

Do changing all these migrations break new installs for SQLite and MySQL?

@@ -14,7 +14,7 @@ public function up(): void
$table->string('id')->primary();
$table->string('type');
$table->morphs('notifiable');
$table->text('data');
$table->json('data');
Copy link
Contributor

Choose a reason for hiding this comment

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

Postgres should basically never use json. Always jsonb. There's a bunch of JSON operations in the code that depend on the database being able to understand the JSON, which is impossible with json.

@@ -33,6 +33,13 @@ protected function getFormActions(): array
return [];
}

protected function prepareForValidation($attributes): array
{
$attributes['data']['email'] = strtolower($attributes['data']['email']);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$attributes['data']['email'] = strtolower($attributes['data']['email']);
$attributes['data']['email'] = mb_strtolower($attributes['data']['email']);

@@ -179,6 +179,10 @@ protected static function booted(): void
return true;
});

static::saving(function (self $user) {
$user->email = strtolower($user->email);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$user->email = strtolower($user->email);
$user->email = mb_strtolower($user->email);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feature New feature 🔴 hard Fairly difficult
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants