• Start

Languages

/

PHP

/

Frameworks

/

Laravel

Schema commands

Dump and apply your Surqlize schema in a Laravel application with the surqlize:schema-dump and surqlize:schema-apply Artisan commands.

The integration adds two Artisan commands for managing your Surqlize schema. Both read the model list from config('surqlize.models').

surqlize:schema-dump prints the schema definitions for the configured models without executing them.

php artisan surqlize:schema-dump

Pass --connection to indicate which connection the dump is intended for.

php artisan surqlize:schema-dump --connection=analytics

surqlize:schema-apply runs the schema definitions against the database.

php artisan surqlize:schema-apply
OptionDescription
--dry-runPrint the schema DDL instead of executing it
--dumpAlias of --dry-run
--connection=The SurrealDB connection to apply to
php artisan surqlize:schema-apply --dry-run

php artisan surqlize:schema-apply --connection=analytics

Was this page helpful?