CounterpartSeeder.php 1.76 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
<?php

use Phinx\Seed\AbstractSeed;

class CounterpartSeeder extends AbstractSeed
{
    /**
     * Run Method.
     *
     * Write your database seeder using this method.
     *
     * More information on writing seeders is available here:
     * http://docs.phinx.org/en/latest/seeding.html
     */
    public function run()
    {
        $data = array(
            array(
                'id' => 1,
                'datec' => '2016-06-22 12:34',
                'user_id' => 1,
                'quoi' => 'pishirt', // [piplome|pibag|pishirt|hoodie]
                'taille' => 8,
                'status' => 1,
                'adresse_id' => 1,
26
                'parent' => 1,
27 28 29 30 31 32
            ),
            array(
                'id' => 2,
                'datec' => '2016-06-22 12:34',
                'user_id' => 2,
                'quoi' => 'piplome', // [piplome|pibag|pishirt|hoodie]
33
                'taille' => 2,
34
                'status' => 2,
35
                'adresse_id' => null,
36
                'parent' => 4,
37
            ),
38 39 40 41 42 43 44 45
            array(
                'id' => 3,
                'datec' => '2016-06-22 12:34',
                'user_id' => 2,
                'quoi' => 'pibag', // [piplome|pibag|pishirt|hoodie]
                'taille' => 2,
                'status' => 2,
                'adresse_id' => null,
46
                'parent' => 4,
47 48 49 50 51
            ),
            array(
                'id' => 4,
                'datec' => '2016-06-22 12:34',
                'user_id' => 2,
okhin's avatar
okhin committed
52
                'quoi' => 'hoodie', // [piplome|pibag|pishirt|hoodie]
53 54 55
                'taille' => 2,
                'status' => 2,
                'adresse_id' => null,
56
                'parent' => 4,
57
            ),
58 59 60 61 62
        );

        $this->table('contreparties')->insert($data)->save();
    }
}