Documentation
¶
Overview ¶
Package seeder runs seeders (like Laravel's DatabaseSeeder).
Index ¶
Constants ¶
View Source
const RootName = "DatabaseSeeder"
RootName is the seeder `db:seed` runs when no --class is given.
Variables ¶
View Source
var Default = NewRegistry()
Default is used by Register and by the CLI.
Functions ¶
Types ¶
type Context ¶
type Context struct {
*goqu.TxDatabase
// contains filtered or unexported fields
}
Context is passed to every seeder. It embeds the goqu transaction, so c.Insert, c.From, c.Update and c.Delete are available directly, and it implements factory.Env.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry maps seeder names to implementations.
Click to show internal directories.
Click to hide internal directories.