'Laravel migration SQL Server default value as function is inserted as string
I have this migration for a SQL Server where the default value NEWID() is a function, but once the migration is executed, it is inserted as string 'newid()'.
<?php
//...
Schema::create('event', function (Blueprint $table) {
$table->string('uuid', 100)->nullable()->default('newid()');
});
How do I let know the migration to insert the default value as NEWID() and not as 'newid()'?
Otherwise, I have to go ahead and insert the default value manually as NEWID().
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
