Laravel Database migrations Schema builder custom column type -


i trying create migrations laravel in situation need custom column type since 1 want isn't included in schema builder , "polygon". want know, how can create custom column type, other in schema builder.

what want in sql statement:

alter table xxx add polygon polygon not null

is possible myself or forced use library this?

i know can this:

db::statement('alter table country add column polygon polygon'); 

but leads me error table doesn't exist.

i assume require spatial fields in db... consider via packagist.org , search laravel-geo (or equivalent) - supports spatial column tyes inc polygon. use standard laravel migration files custom fields -e.g.

$table->polygon('column_name'); 

in function in migration file...


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -