Skip to content
New issue

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

Remove seed migrations gem and start new seeding system #1480

Closed
wants to merge 8 commits into from
Closed

Conversation

erbridge
Copy link
Contributor

@erbridge erbridge commented Oct 6, 2022

@kimadactyl
Copy link
Member

kimadactyl commented Oct 7, 2022

This is maybe a bit in the weeds but it would be very nice to have a sketch map of Normal Island you can refer to when reasoning about PlaceCal - sounds silly but I think having a concrete visualisation will help people no end

@erbridge
Copy link
Contributor Author

erbridge commented Oct 7, 2022

This was mainly so I could actually run PlaceCal without having a production data dump, which I realised was why I was stuck in a redirection loop.

@ivan-kocienski-gfsc ivan-kocienski-gfsc self-assigned this Jan 26, 2023
@ivan-kocienski-gfsc
Copy link
Contributor

Looks like this is where Neighbourhoods get loaded in

@kimadactyl
Copy link
Member

kimadactyl commented Jan 26, 2023

Looks like this is where Neighbourhoods get loaded in

Ok but this pr and the linked tickets are explicitly not addressing neighbourhoods, it's just getting a basic seed system up and running

@ivan-kocienski-gfsc
Copy link
Contributor

Hmm perhaps I am misunderstanding terminology here: to me seeding a database is where you have nothing in the db and load all the sample data in that a dev will typically need day to day.

So we assume the migration populates neighbourhood and then never touch that table again? Okay.

Perhaps the original issue could describe what needs to be seeded like:

  • Create Users, Site, Tags, Partners
  • Link User to Site and different User to Partner
  • Maybe make Online Partner, Address Partner and Service Area Partner (and Tag Partner?)
  • Create Calendar
  • Create some events linking Partner to Site. ( <-- could be tricky)

@kimadactyl
Copy link
Member

I don't think you're misunderstanding, you're just trying to fix everything in one go.

The goal here is to just improve it on how it is now - i.e. take out the seed migrations gem and make seeding a user actually work.

We don't have to eat the whole elephant in one bite! Each of those other steps is correct but is an additional ticket.

`rails db:info` will now print out Rails configuration and
table counts.
@ivan-kocienski-gfsc
Copy link
Contributor

Just so you know if you run bin/setup it will drop the database and bring it back up from schema (and then run the seeds). This means there is an empty database with no neighbourhoods.

@kimadactyl
Copy link
Member

Ahh that's a big gotcha and we should add a warning for that.

I don't think this needs any extra features tho! We can just merge it when the tests pass. We should be adding the seed files a bit more conciously IMO.

@kimadactyl kimadactyl changed the title WIP Seeds Remove seed migrations gem and start new seeding system Jan 30, 2023
- Only make one user, activates devise
- Only one site, the default site
- No tag seeding
@kimadactyl
Copy link
Member

Closed but remade in other PR to avoid annoying git issues

@ivan-kocienski-gfsc ivan-kocienski-gfsc deleted the seeds branch February 15, 2024 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants