0
for example I have the student table (name, age);
Then I create a Migration to add the genus (M/F)
Schema::table('estudantes', function (Blueprint $table) {
$table->string('genero')->nullable();
});
but instead of using nullable(), I wanted to know if it is possible to create this column with all values like M (male), for example.
Is that possible?
Try
$table->char("genero", 1)->default("M");
– Valdeir Psr
worked, thanks!
– Ygor Dutra