mattes / migrate

Database migrations. CLI and Golang library.
Other
2.29k stars 326 forks source link

error: no scheme for sqlite3 #332

Open Vikash082 opened 6 years ago

Vikash082 commented 6 years ago

Was trying tool for sqlite3 migration.

$cat ./migration/1_init_schema.up.sql CREATE TABLE pets ( name string );

command: $./migrate.linux-amd64 -database "sqlite3" -path ./migration/ up 1 error: no scheme

Is this bcoz I didn't passed DB? How the DB file is supposed to get created ? From command line we use $sqlite3 test.db

What need to be done ?

nii236 commented 6 years ago

Hey @Vikash082 you need to compile migrate with the sqlite3 build tag.

I also believe your syntax needs to be -database "sqlite3://mydb.db"

Please have a read here for a postgres example.