typeorm-seeder
A simple extension library for typeorm to perform seeding
Last updated 10 months ago by yoshiyuki .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install typeorm-seeder 
SYNC missed versions from official npm registry.

typeorm-seeder

A simple extension library for typeorm to perform seeding.

$ npm install typeorm #install typeorm as a peer dependency
$ npm install --save-dev typeorm-seeder
$ $(npm bin)/typeorm-seeder [-c path/to/ormconfig] <path/to/seedfile>
// ./entities/sample.ts
import { Entity, Column, PrimaryColumn } from "typeorm";

@Entity()
export class Sample {
  @PrimaryColumn()
  id: number;

  @Column()
  name: string;
}
// ./seeds/sample.ts
import { Sample } from "../entities/sample";
import { ISeed } from "typeorm-seeder";

const samples = [
  {
    id: 1,
    name: "test",
  },
];

export default <ISeed>{
  Entity: Sample,
  seeds: samples,
};

Current Tags

  • 0.1.6-beta-1                                ...           beta (a year ago)
  • 0.3.0                                ...           latest (10 months ago)

12 Versions

  • 0.3.0                                ...           10 months ago
  • 0.2.1                                ...           10 months ago
  • 0.2.0                                ...           a year ago
  • 0.1.6                                ...           a year ago
  • 0.1.6-beta-1                                ...           a year ago
  • 0.1.6-beta                                ...           a year ago
  • 0.1.5                                ...           a year ago
  • 0.1.4                                ...           a year ago
  • 0.1.3                                ...           a year ago
  • 0.1.2                                ...           a year ago
  • 0.1.1                                ...           a year ago
  • 0.1.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (11)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |