Laravel Schema has a command for ENUM equivalent to the table. What is the SET equivalent to the table?
My simple once-off solution when you need to create a custom column without creating additional files to describe extended grammar. Here I add my custom type rsvp_statuses into PostgresGrammar:
public function up()
{
DB::connection()->setSchemaGrammar(new class extends PostgresGrammar {
protected function typeRsvp_statuses(\Illuminate\Support\Fluent $column)
{
return 'rsvp_statuses';
}
});
Schema::create('mytable', function (Blueprint $table) {
$table->bigIncrements('id');
//...
$table->addColumn('rsvp_statuses', 'status');
$table->timestamps();
});
}