Questions tagged [seeding]
525 questions
4
votes
0 answers
Sequelize CLI complains about "Unexpected Identifier" when attempting to run db:seed:all
I am trying to set up a seeder for my Sequelize models. I have a single 1-many association. All of my syntax appears to be correct and passes through my linter (semistandard) successfully.
Whenever I run either version using sequelize db:seed:all, I…

metamarcdw
- 41
- 4
4
votes
2 answers
ASP.NET Core 2.2 Create IdentityUser
Brand new to ASP.Net Core. Having to create an asp.net core 2.2 project with Identity (and have users seeded).
I can't find any documentation on how to do this exactly.
I was able to find the code to create Identity Roles (compiles anyway, haven't…

Owen
- 426
- 5
- 15
4
votes
1 answer
Rake db:seed working on local, heroku rake db:seed trying to insert null into id column
For some reason my db:seed is not working when I try to do it via heroku. It works fine when I do it locally.
paul@paul-laptop:~/rails_projects/foglift$ heroku rake db:seed
rake aborted!
PGError: ERROR: null value in column "id" violates not-null…

Paul Pettengill
- 4,843
- 1
- 29
- 33
4
votes
3 answers
Laravel seeding via SQL file
I'm trying to read data from a .sql file in a seeder to fill 3-4 tables with some data and DatabaseSeeder.php looks like this
public function run() {
$this->call([
UsersTableSeeder::class,
// Bunch of seeders using Eloquent
…

Alain D'Ettorre
- 134
- 1
- 4
- 12
4
votes
1 answer
Faker gem: possible to seed with stylized text?
I use the Faker gem to seed my db with fake data. For some variables I for example use Faker::Lorem.paragraph(4). But what I would really want is to seed with text that has styling in it. Such as etc. Is this possible with the Faker gem?

Nick
- 3,496
- 7
- 42
- 96
4
votes
1 answer
Eloquent Seeder - only add if data doesn't exist
I have a table called permissions; this is like the different roles a user can have. As the project grows, I may add more functionalities, therefore more permissions are created.
I have a PermissionSeeder.php that I would like to keep on adding the…

Kousha
- 32,871
- 51
- 172
- 296
4
votes
3 answers
Rails: rake db:seed aborted, no implicit conversion of nil into String
When I do the following:
rake db:drop
rake db:create
rake db:migrate
rake db:seed
This is what I get:
rake aborted!
no implicit conversion of nil into string
app/mailers/base_mailer.rb:47:in '[]'
app/mailers/base_mailer.rb:47:in 'chimp_mail'
I…

uralika
- 193
- 2
- 8
4
votes
1 answer
Rails 3 Generate Seed file from single Database Table
I have tried scouring the mighty google, but can't seem to find what I am looking for (probably because what I am wanting to do is stupid)
But, is there a way to create a seed file from just a single database table instead of dumping the entire…

dennismonsewicz
- 25,132
- 33
- 116
- 189
3
votes
1 answer
In Julia set random seed and not generating same values if calling a function from different parts of program
I have a Julia program which runs some montecarlo simulations. To do this, I set a seed before calling the function that generates my random values. This function can be called from different parts of my program, and the problem is that I am not…
3
votes
2 answers
EF Core Seed Database OneToMany Relationship with predefined Lists
I am trying to seed a OneToMany Relationship in my Database with defined List<> and I get the following Error-Msg
'The seed entity for entity type 'Country' cannot be added because it has the navigation 'WineRegions' set. To seed relationships you…

bkDev
- 66
- 5
3
votes
5 answers
How do I prevent my script from being run every time a Docker container is brought up?
I would to run a script (populate my MySql Docker container) only when my docker containers are built. I'm running the following docker-compose.yml file, which contains a Django container.
version: '3'
services:
mysql:
restart: always
…

Dave
- 15,639
- 133
- 442
- 830
3
votes
0 answers
Why do the pictures attached to my seeded items not display on Heroku (ERROR 500)?
First-time poster, I tried to follow the rules but please tell me if anything is missing and/or needs to be edited in this question.
TL;DR : using ActiveStorage, pictures associated to items display fine on localhost but not on Heroku
Initial…

Gaël
- 31
- 1
- 4
3
votes
0 answers
Unable to reproduce result obtained from hyperparameter tuning using hyperopt
I have built a Pytorch model and performed hyperparameters tuning using library Hyperopt. The result obtained is not reproducible despite I have already call the below seeding function at the beginning of each run:
util.py
def…

jimmystackoverflowjiim
- 151
- 1
- 2
- 10
3
votes
4 answers
Generate seed data in Visual Studio 2010 Database project
I have a database and a database project in Visual studio 2010. I inferred the schema in the database project successfully but I also need to import somehow the data in a few tables (Country, State, UserType etc.) that are reference tables and not…

Andrei Rînea
- 20,288
- 17
- 117
- 166
3
votes
2 answers
Stuck trying to use Random object for my Intro to Computer Programming with Java homework
Briefly, I have textbook lab assignments for this class and I'm currently doing a module on objects. This lab has me using a random number generator but due to auto grading it needs repeatability. It does this by seeding with 2 but I can't seem to…

Boog
- 31
- 1
- 3