Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

[feature] implementing model generation for resources #270

Merged
merged 9 commits into from
Mar 9, 2017

Conversation

paganotoni
Copy link
Member

@paganotoni paganotoni commented Mar 4, 2017

This adds model/migration generation for the resources generator, its related with #42

@markbates
Copy link
Member

Sorry about the delay, I just got around to playing with this. A few observations.

  • There's no documentation when using --help anywhere that explains this. so it might not be obvious that this will create a model as well.
  • model generator has an option to --skip-migration, which this doesn't support
  • there's no way to not generate a model.

@paganotoni
Copy link
Member Author

Thanks @markbates I'll work on these and let you know, thanks for the feedback.

@markbates
Copy link
Member

You should also look at this PR #272

@paganotoni
Copy link
Member Author

paganotoni commented Mar 6, 2017

@markbates added examples on command and allowed users to --skip-migration or --skip-model which will skip both, model and migration.

@markbates
Copy link
Member

Looks like the --skip-migration flag doesn't work. :(

buffalo g resource bands --skip-migration
Buffalo version 0.7.4

--> actions/bands.go
--> actions/bands_test.go
--> buffalo db g model band
v3.11.6

--> models/band.go
--> models/band_test.go
--> goimports -w .
> migrations/20170308230324_create_bands.up.fizz
> migrations/20170308230324_create_bands.down.fizz
--> goimports -w .

@paganotoni
Copy link
Member Author

^ This needs some changes on filetest. (PR's ready)

@markbates
Copy link
Member

@apaganobeleno i merged the filetest changes if you want to rebase this and see if the tests pass.

@paganotoni
Copy link
Member Author

@markbates all set, thanks for merging those

@markbates markbates merged commit da9976e into v0.8.0 Mar 9, 2017
@markbates markbates deleted the features/resources-model branch March 9, 2017 15:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants