Skip to content

Conversation

@SMI-82
Copy link

@SMI-82 SMI-82 commented Sep 22, 2025

Hello! 👋
I’d like to contribute to your project. This pull request includes a few fixes that improve the functionality. Looking forward to your feedback!

Copy link
Member

@sorinsarca sorinsarca left a comment

Choose a reason for hiding this comment

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

Hello @SMI-82, thank you for your contribution!

I would like to bring to your attention a few things:

  • one pull-request per feature, I usually don't merge multiple unreleated changes
  • make sure you don't break backward compatibility
  • add tests for your changes
  • it is always better to discuss if something should be added (open an issue)

This project supports multiple database systems (MySQL, PostgreSQL, Microsoft SQL, SQLite, etc.) but most of your features are MySQL only.
You can find more details in the review attached to this PR.

/**
* @return $this
*/
public function nullable(): self
Copy link
Member

Choose a reason for hiding this comment

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

Columns are nullable by default, this is redundant.

* @param string $value
* @return $this
*/
public function collate(string $value): self
Copy link
Member

Choose a reason for hiding this comment

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

Different DBs use different values for COLLATE.

/**
* @return $this
*/
public function onUpdateCurrentTimeStamp(): self
Copy link
Member

Choose a reason for hiding this comment

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

MySQL specific.
You can implement this in most DBs using a TRIGGER.

* @return string
*/
protected function handleModifierComment(BaseColumn $column): string
{
Copy link
Member

Choose a reason for hiding this comment

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

MySQL only.

* @return $this
*/
public function timestamps(string $createColumn = 'created_at', string $updateColumn = 'updated_at'): self
public function timestamps($fields = []): self
Copy link
Member

Choose a reason for hiding this comment

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

Breaks backward compatibility!

* @param BaseColumn $column
* @return string
*/
protected function handleModifierOnUpdateCurrentTimeStamp(BaseColumn $column): string
Copy link
Member

Choose a reason for hiding this comment

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

MySQL only.

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.

2 participants