Skip to content

[Task]: Schema::sort method #2456

@norberttech

Description

@norberttech

What needs to be done?

#2454 added some cool ways to control schema order, but there is one more additional method we could add.

Schema::sort(SortingStrategy $strategy = new AlphabeticalStrategy()); 

By default we could make it sort schema in alphabetical orders, but there are more strategies we could add here:

  • order by column type (with type weight map)
  • order by metadata (we could create a metadata helpers for this)

And then on top of that, adapters could provide even more advanced schema sorting strategies, like for example

  • order by postgresql type

Where we would make PK columns first, then by type and then by name inside of type.

Metadata

Metadata

Labels

No labels
No labels

Type

No fields configured for Task.

Projects

Status
Todo

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions