In Laravel migrations, what should I use as the default value of Point
type column? I originally wanted to keep it NULL
but then I read that:
Columns in spatial indexes must be declared NOT NULL.
So what should I use as the default value of my column and how do I specify that in migration, to represent NULL
, something like 0,0
or -1,-1
?
$table->point('location')->default(???);
UPDATE
Doing more research, I found an even bigger issue. MySQL doesn't allow specifying default value for POINT
type column. So I must insert a NULL
-equivalent at INSERT
time. What would be the correct value for this purpose?