lucid icon indicating copy to clipboard operation
lucid copied to clipboard

test(seeds): new environment config

Open RomainLanz opened this issue 3 years ago • 2 comments

Hey there! 👋🏻

This PR adds the option environment to the Seeder class. This allows us to configure what environment our seeder should run more precisely.

The current developmentOnly setting is too restrictive.

RomainLanz avatar Jun 08 '22 15:06 RomainLanz

Can we also deprecate the developmentOnly flag with a runtime warning and also using @deprecated docblock for TypeScript?

thetutlage avatar Jun 10 '22 05:06 thetutlage

I have updated the code to add the deprecation warning. However, I am unsure about the runtime warning since the flag is defined in BaseSeeder.

RomainLanz avatar Jun 23 '22 10:06 RomainLanz

Small bump 😋

RomainLanz avatar Aug 23 '22 07:08 RomainLanz

Can we also update the docs to reflect the usage of environment? https://docs.adonisjs.com/guides/database/seeders#development-only-seeders

thetutlage avatar Aug 24 '22 08:08 thetutlage