DonationSeeder.php 2.89 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 DonationSeeder 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,
                'status' => 1,
                'datec' => '2016-06-10 12:34',
                'somme' => 1000,
                'lang' => 'fr_FR',
                'cadeau' => 1,
                'abo' => 1,
Okhin's avatar
Okhin committed
26
                'taille' => 2,
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
                'public' => 0,
                'pdf' => 'pdf',
                'decimale' => 2,
                'datee' => '2016-06-10 12:34',
                'mailsent' => 1,
                'color' => 'blue',
                'pi_x' => 3,
                'pi_y' => 3,
                'hash' => 'hash',
                'taille_h' => 8,
                'fdnn_user' => 1234567890,
                'color_2' => 'red',
                'cumul' => 1000,
                'adresse_id' => 1,
                'user_id' => 1,
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
		        'identifier' => 'id1',
            ),
            array(
                'id' => 2,
                'status' => 1,
                'datec' => '2016-06-10 12:34',
                'somme' => 1000,
                'lang' => 'fr_FR',
                'cadeau' => 1,
                'abo' => 1,
                'taille' => 8,
                'public' => 0,
                'pdf' => 'pdf',
                'decimale' => 2,
                'datee' => '2016-06-10 12:34',
                'mailsent' => 1,
                'color' => 'blue',
                'pi_x' => 3,
                'pi_y' => 3,
                'hash' => 'hash',
                'taille_h' => 8,
                'fdnn_user' => 1234567890,
                'color_2' => 'red',
                'cumul' => 1000,
66
                'adresse_id' => 3,
67 68 69 70 71
                'user_id' => 2,
		        'identifier' => 'id2',
            ),
            array(
                'id' => 3,
Okhin's avatar
Okhin committed
72
                'status' => 100,
Okhin's avatar
Okhin committed
73
                'datec' => '2016-06-11 12:34',
Okhin's avatar
Okhin committed
74
                'somme' => 100,
75 76 77 78
                'lang' => 'fr_FR',
                'cadeau' => 1,
                'abo' => 1,
                'taille' => 8,
Okhin's avatar
Okhin committed
79
                'public' => 1,
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
                'pdf' => 'pdf',
                'decimale' => 2,
                'datee' => '2016-06-10 12:34',
                'mailsent' => 1,
                'color' => 'blue',
                'pi_x' => 3,
                'pi_y' => 3,
                'hash' => 'hash',
                'taille_h' => 8,
                'fdnn_user' => 1234567890,
                'color_2' => 'red',
                'cumul' => 1000,
                'adresse_id' => 1,
                'user_id' => 2,
        		'identifier' => 'id3',
95 96 97 98 99 100
            )
        );

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