526 questions
1
vote
1
answer
229
views
Trying to seed data using Identity.AspNetCore with .UseSeeding and .UseAsyncSeeding?
So I've ran into an issue that I am not sure how to handle.
You see I am trying to deal with an Initial seeding of Admin data for my App.
But the thing is.. Since I am using Identity to handle both ...
0
votes
1
answer
245
views
PostgreSQL SET session_replication_role = replica not bypassing constraints in Supabase seed file
I'm trying to seed data into my Supabase database but even though my seed.sql (generated by Supabase) includes SET session_replication_role = replica at the top, constraints are still being enforced. ...
0
votes
0
answers
42
views
Why does my NestJS seeding script want other modules?
I have a NestJS app and I want to create a seeding script for status. Here is my script:
import { NestFactory } from '@nestjs/core';
import { AppModule } from '../../app.module';
import { Status } ...
0
votes
0
answers
96
views
How to avoid duplicated entries while seeding a database using typeorm-extension
In a NestJS with TypeORM I tried to seed a MariaDB database using typeorm-extension package. The problem is that sometimes while running the script to seed the database it creates duplicated entries ...
1
vote
1
answer
50
views
Change of Program.cs in ASP.NET Core 6 for seedData
I work in ASP.NET Core 6. I have a Json file containing user information to be stored in the database. I also have a class as (SeedUserData) that reads from that json file and stores users one by one ...
0
votes
1
answer
44
views
If i hardcode seed file mock data it works but if i import mock data for seeding from other file it does not work
In my seed.ts file if i import mock user data from other file it raise error.
zohaibamir@174-16-0-44 stt % npx prisma db seed
Environment variables loaded from .env
Running seed command `ts-node --...
0
votes
1
answer
103
views
Store numbers as "random" seed
Is it possible to calculate a seed from a given list of numbers, such that this seed will cause a number-generating function (like rand()) to output this list of numbers?
And, at which point does it ...
0
votes
2
answers
233
views
Error when seeding a relationship using Prisma 5 and JavaScript
I am trying to seed my prisma db but am having trouble doing so with a user -> Payment relation.
Seeder Code:
export const userSeeder = async (prisma) => {
const productIds = await ...
0
votes
0
answers
221
views
How to save array of key, value from json file? using prisma sqlite
I am unable to save customers, purchased items to my database, I am using sqlite prisma, belwo is my customers.json
[
{
"id": 1,
"firstName": "Emily",
"...
0
votes
1
answer
66
views
How to put common data in seeds and fixtures on Ruby-on-Rails?
I would like to assign identical data to some of the records for seeds for DB-initialization and fixtures for testing on Ruby-on-Rails, without violating the DRY principle.
For example, let us ...
0
votes
0
answers
65
views
TypeError: db.Game.deleteMany is not a function
I'm trying to update an app written in react a few years ago & keep getting an error saying "TypeError: db.Game.deleteMany is not a function"
Seed.js
const db = require('./models');
...
0
votes
1
answer
387
views
seeding static data in laravel 10 error argument #1 must be of type array
I'm trying to seed a static data (existing categories) to a 'categories' table in Laravel 10.
I'm very new to Laravel so I'm confused even after reading the documentation and tutorial videos. This is ...
0
votes
1
answer
187
views
Seeding data using static method and IApplicationBuilder in ASP.NET Core
I really don't understand what's going on in this EnsurePopulated method which creates seeding data.
public static class SeedData
{
public static void EnsurePopulated(IApplicationBuilder app)
{...
2
votes
1
answer
159
views
Is it possible to seed data with specific identifier using EF Core custom initialization logic?
Using EntityFramework Core 7.0, I would like to seed some data while being able to specify identifiers (primary keys) for the records to create.
As this seeding is needed for integration testing ...
4
votes
2
answers
474
views
Using operator>> to seed mt19937
In a blog post entitled "C++ Seeding Surprises," Melissa E. O'Neill reports that, "When std::seed_seq tries to “fix” high-quality seed data, it actually makes it worse." According ...