Closed wanze closed 9 years ago
Hi Sveta, No problem you can implement it if you like :) I'm working on a separate branch and have done some minor stuff for the achievments / Validators. At the end we can merge together what we've done! Cheers
@wanze Stefan, sorry it took some time:) I pushed the relevant models to the branch sport_res. I am not sure this is what we want, so please have a look. Both RunningParticipantResult and BoxingParticipantResult have a foreign key sport_session_participant_id. Does it make sense?
@svetakrasikova Makes perfectly sense to me :) With the link to the sport_session_participant table we can get the user + sport session. I couldn't find the models in the branch "sport_res", are you sure you pushed them? Did look in /app/models and db/migrations // db/schema
I'll have a look in a sec. I may have mixed things up a bit (was lost in my branches:) 11 Nov 2014, в 21:52, Stefan Wanzenried notifications@github.com написал(а):
@svetakrasikova Makes perfectly sense to me :) With the link to the sport_session_participant table we can get the user + sport session. I couldn't find the models in the branch "sport_res", are you sure you pushed them? Did look in /app/models and db/migrations // db/schema
— Reply to this email directly or view it on GitHub.
@wanze Stefan, my models mysteriously disappeared. I just generated them again and pushed to the aforementioned branch, viz. sport_res. Sorry: much ado about nothing! However, when I try to rake db:migrate it aborts and tells me that the tables already exist. Hope you won't have this!
Hi Sveta,
I've had some problems, but we generally do stuff wrong regarding the db schema. :) I noticed that you pushed the schema of the new models to the dev branch with this commit: https://github.com/Bergrebell/CyberCoach/commit/e6be73afb313592515ed1636f6ad9a55b1382fb9 The problem is, this file should never be modified directly. Instead, every schema change must be executed with a corresponding migration file. Otherwise rails messes up the schema, this happened in my case.
Here is a description how this works: http://guides.rubyonrails.org/migrations.html
Note that when you generate your model with "rails generate model", this will create a schema file for you. My solution was to reset the db. I will merge your models into dev now, good work! :)
Hi Stefan, sorry for this mess and thank you for explaining what's been happening :) I really appreciate this! Will take some time to have a closer look at migrations. 14 Nov 2014, в 00:15, Stefan Wanzenried notifications@github.com написал(а):
Hi Sveta,
I've had some problems, but we generally do stuff wrong regarding the db schema. :) I noticed that you pushed the schema of the new models to the dev branch with this commit: e6be73a The problem is, this file should never be modified directly. Instead, every schema change must be executed with a corresponding migration file. Otherwise rails messes up the schema, this happened in my case.
Here is a description how this works: http://guides.rubyonrails.org/migrations.html
Note that when you generate your model with "rails generate model", this will create a schema file for you. My solution was to reset the db. I will merge your models into dev now, good work! :)
— Reply to this email directly or view it on GitHub.
@wanze Hi Stefan, are you doing this or should/can I? Sorry I haven't done this before!!! I am just starting to work, no excuse, I know...