We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When trying to create a resource with a relationship like
User: hasMany: messages fields: name: schema: string:50 rules: required|min:3 tags: fillable email: schema: string unique rules: required|email|unique:users,email tags: fillable password: schema: string rules: required|min:6 tags: fillable Message: belongsTo: user belongsToMany: channel fields: text: schema: text rules: required tags: fillable add: timestamps softDeletes
and you run wn:resources /path/to/file.yaml
it will generate a duplicate column for the foriegn key
public function up() { Schema::create('messages', function(Blueprint $table) { $table->increments('id'); $table->text('text'); $table->integer('user_id'); $table->integer('user_id')->unsigned(); $table->foreign('user_id') ->references('id') ->on('users'); $table->timestamps(); $table->softDeletes(); }); }
Also after a bit of testing and poking around I think there should be option or a flag to prevent the resource from running a migration.
The text was updated successfully, but these errors were encountered:
@dopyoman Thank you for testing and finding this bug, I fixed it and made a new release https://github.com/webNeat/lumen-generators/releases/tag/1.3.1
I have also opened a new issue Add possibility to not run migrations when using wn:resources because I am closing this one.
wn:resources
Fell free to reopen it if the bug seems not to be fixed.
Sorry, something went wrong.
No branches or pull requests
When trying to create a resource with a relationship like
and you run wn:resources /path/to/file.yaml
it will generate a duplicate column for the foriegn key
Also after a bit of testing and poking around I think there should be option or a flag to prevent the resource from running a migration.
The text was updated successfully, but these errors were encountered: