Run the database seeds.

@return void
165533
public function run()
    {
        $gallery_type = ContentType::create([
            'name' => 'Gallery',
            'notes' => ''
        ]);

        $images_fieldset = ContentFieldset::create([
            'parent_id' => $gallery_type->id,
            'parent_type' => get_class($gallery_type),
            'name' => 'Images',
            'machine_name' => 'images',
            'description' => '',
            'repeatable' => 1
        ]);

        ContentField::create([
            'fieldset_id' => $images_fieldset->id,
            'name' => 'File',
            'machine_name' => 'file',
            'type' => 'image',
            'widget' => 'media',
            'help_text' => '',
            'rules' => '',
            'data' => 'a:2:{s:10:"enable_alt";b:1;s:12:"enable_title";b:1;}'
        ]);

        //create permissions
        Permission::create(['name' => 'view_content_type_' . $gallery_type->id, 'label' => trans('chronos.content::permissions.View :name' , ['name' => str_plural(strtolower($gallery_type->name))]), 'order' => 10]);
        Permission::create(['name' => 'add_content_type_' . $gallery_type->id, 'label' => trans('chronos.content::permissions.Add :name' , ['name' => str_plural(strtolower($gallery_type->name))]), 'order' => 10]);
        Permission::create(['name' => 'edit_content_type_' . $gallery_type->id, 'label' => trans('chronos.content::permissions.Edit :name' , ['name' => str_plural(strtolower($gallery_type->name))]), 'order' => 10]);
        Permission::create(['name' => 'edit_content_type_fieldsets_' . $gallery_type->id, 'label' => trans('chronos.content::permissions.Edit :name fieldsets' , ['name' => str_plural(strtolower($gallery_type->name))]), 'order' => 10]);
        Permission::create(['name' => 'delete_content_type_' . $gallery_type->id, 'label' => trans('chronos.content::permissions.Delete :name' , ['name' => str_plural(strtolower($gallery_type->name))]), 'order' => 10]);
        Permission::create(['name' => 'export_content_type_' . $gallery_type->id, 'label' => trans('chronos.content::permissions.Export :name' , ['name' => str_plural(strtolower($gallery_type->name))]), 'order' => 10]);
        Permission::create(['name' => 'lock_content_type_delete_' . $gallery_type->id, 'label' => trans('chronos.content::permissions.Lock :name delete' , ['name' => str_plural(strtolower($gallery_type->name))]), 'order' => 10]);
    }
1248868
public function run()
    {
        $this->Script->startup();

        $this->Options = $this->Script->getOptions(
            "[db-host:][db-user:][db-password:][db-database:][db-type:|db-driver:][sql][clean][clean-all][conc:][php-exec:][commit-within:]",
            "",
            array(
                'db-host' => "Database host",
                'db-user' => "Database user",
                'db-password' => "Database password",
                'db-database' => "Database name",
                'db-driver' => "Database driver",
                'db-type' => "Database driver, alias for --db-driver",
                'sql' => "Display sql queries",
                'clean' =>  "Remove all search data of the current installation id before beginning indexing",
                'clean-all' => "Remove all search data for all installations",
                'conc' => 'Parallelization, number of concurent processes to use',
                'php-exec' => 'Full path to PHP executable',
                'commit-within' => 'Commit to Solr within this time in seconds (default '
                    . self::DEFAULT_COMMIT_WITHIN . ' seconds)',
            )
        );
        $this->Script->initialize();

        // check if ezfind is enabled and exit if not
        if ( ! in_array( 'ezfind', eZExtension::activeExtensions() ) )
        {
            $this->CLI->error( 'eZ Find extension is not enabled and because of that index process will fail. Please enable it and run this script again.' );
            $this->Script->shutdown( 0 );
        }

        // Fix siteaccess
        $siteAccess = $this->Options['siteaccess'] ? $this->Options['siteaccess'] : false;
        if ( $siteAccess )
        {
            $this->changeSiteAccessSetting( $siteAccess );
        }
        else
        {
            $this->CLI->warning( 'You did not specify a siteaccess. The admin siteaccess is a required option in most cases.' );
            $input = readline( 'Are you sure the default siteaccess has all available languages defined? ([y] or [q] to quit )' );
            if ( $input === 'q' )
            {
                $this->Script->shutdown( 0 );
            }
        }

        // Check that Solr server is up and running
        if ( !$this->checkSolrRunning() )
        {
            $this->Script->shutdown( 1 );
            exit();
        }

        $this->initializeDB();

        // call clean up routines which will deal with the CLI arguments themselves
        $this->cleanUp();
        $this->cleanUpAll();

        if ( isset( $this->Options['commit-within'] )
                && is_numeric( $this->Options['commit-within'] ) )
        {
            $this->commitWithin = (int)$this->Options['commit-within'];
        }


        $this->CLI->output( 'Starting object re-indexing' );

        // Get PHP executable from user.
        $this->getPHPExecutable();

        $this->runMain();
    }
310125
public function run()
    {
        \DB::table('lfm_categories')->delete();
        \DB::table('lfm_categories')->insert(
            array (
                'id' => '0',
                'user_id' => 0,
                'title' => 'Root folder',
                'title_disc' => 'root_folder',
                'description' => 'root',
                'parent_category_id' => '#',
                'created_by' => 0,
                'created_at' => NULL,
                'updated_at' => NULL,
                'deleted_at' => NULL,
            )
        );
        \DB::unprepared("UPDATE lfm_categories SET id=0");
        \DB::table('lfm_categories')->insert(array (
            0 =>
                array (
                    'id' => -5,
                    'user_id' => 0,
                    'title' => 'Direct upload',
                    'title_disc' => 'direct_folder',
                    'description' => 'direct upload folder',
                    'parent_category_id' => '#',
                    'created_by' => 0,
                    'created_at' => NULL,
                    'updated_at' => NULL,
                    'deleted_at' => NULL,
                ),
            1 =>
                array (
                    'id' => -2,
                    'user_id' => 0,
                    'title' => 'Share folder',
                    'title_disc' => 'share_folder',
                    'description' => 'share',
                    'parent_category_id' => '#',
                    'created_by' => 0,
                    'created_at' => NULL,
                    'updated_at' => NULL,
                    'deleted_at' => NULL,
                ),
            2 =>
                array (
                    'id' => -1,
                    'user_id' => 0,
                    'title' => 'public folder',
                    'title_disc' => 'public_folder',
                    'description' => 'public',
                    'parent_category_id' => '#',
                    'created_by' => 0,
                    'created_at' => NULL,
                    'updated_at' => NULL,
                    'deleted_at' => NULL,
                ),
        ));

    }
1313156
public function run()
    {
        $default = [
            'module_name' => null,
            'action' => 'setting',
            'class' => 'form-control',
            'section' => 'main',
            'fieldset' => 'general',
            'name' => null,
            'type' => 'string',
            'value' => null,
            // '{"id":"id"}'
            'params' => null,
            'html_flags' => 'required',
        ];

        \DB::table('settings')->insert($this->getArticles($default));
        \DB::table('settings')->insert($this->getComments($default));
        \DB::table('settings')->insert($this->getFiles($default));
        \DB::table('settings')->insert($this->getSystem($default));
        \DB::table('settings')->insert($this->getTags($default));
        \DB::table('settings')->insert($this->getThemes($default));
        \DB::table('settings')->insert($this->getUsers($default));
    }
814194
public function run()
    {
        $this->seedLessons();
        $this->seedDays();
        $this->seedShifts();
        $this->seedTimeslots();
        $this->seedAttendancesType();
        $this->seedAttendances();
    }
805683
public function run()
    {
        Model::unguard();

        // Users
        $users = [
            [
                'first_name' => 'Su',
                'last_name' => 'Acl',
                'email' => 'su@acl.com',
                'password' => bcrypt('123'),
                'superuser' => TRUE,
                'remember_token' => str_random(10),
                'created_at' => date('Y-m-d H:i:s'),
                'updated_at' => date('Y-m-d H:i:s'),
            ],
        ];

        DB::table('users')->insert($users);

        // Roles
        $roles = [
            [
                'name' => 'Admin',
                'description' => 'Admin',
            ],
        ];

        DB::table('roles')->insert($roles);
    }
619180
public function run()
    {
        DB::beginTransaction();
        try {
            $this->down();
            $this->addNotification([
                'category' => 'default',
                'severity' => 'high',
                'type'     => 'email',
                'event'    => 'email.sample-module-notification',
                'contents' => [
                    'en' => [
                        'title'   => 'Sample Email Template',
                        'content' => file_get_contents(__DIR__ . '/../../views/notification/module_sample_notification.twig')
                    ],
                ]
            ]);
        } catch (Exception $ex) {
            DB::rollback();
            throw $ex;
        }

        DB::commit();
    }
1243290
public function run()
	{
		Eloquent::unguard();

		$this->call('DomAndTom\LaravelSwagger\CategoryTableSeeder');
		$this->command->info('Laravel Swagger Demo Categories seeded!');

		$this->call('DomAndTom\LaravelSwagger\TagTableSeeder');
		$this->command->info('Laravel Swagger Demo Tags seeded!');

		$this->call('DomAndTom\LaravelSwagger\PetTableSeeder');
		$this->command->info('Laravel Swagger Demo Pets seeded!');
	}
756942
public function run() {
		$transactions = Transaction::get_runnable();

		foreach ($transactions as $transaction) {
			$transaction->lock();
			self::run_transaction($transaction);
			$transaction->unlock();
		}
	}
356209
public function run()
    {
        DB::table('posts')->delete();

        $post = array(
            'title'      => 'Hello World',
            'summary'    => 'This is the first blog post.',
            'body'       => 'This is an example blog post.',
            'user_id'    => 1,
            'created_at' => new DateTime,
            'updated_at' => new DateTime
        );

        DB::table('posts')->insert($post);
    }
391885
public function run()
    {
        $this->seed([
            [
                'group'       => [
                    'name'        => 'SEO',
                    'slug'        => 'seo',
                    'description' => 'SEO permissions group',
                ],
                'permissions' => array_merge(
                    $this->getDashboardSeeds(),
                    $this->getPagesSeeds(),
                    $this->getFootersSeeds(),
                    $this->getMetasSeeds(),
                    $this->getRedirectsSeeds()
                ),
            ],
        ]);
    }
699522
public function run()
    {
        $this->seed([
            [
                'group'       => [
                    'name'        => 'Auth',
                    'slug'        => 'auth',
                    'description' => 'Auth permissions group',
                ],
                'permissions' => array_merge(
                    $this->getDashboardPermissions(),
                    $this->getUsersPermissions(),
                    $this->getRolesPermissions(),
                    $this->getPermissionsPermissions(),
                    $this->getPasswordResetsPermissions()
                ),
            ],
        ]);
    }
1041048
public function run()
    {
        $this->call(PermissionSeeder::class);
        $this->call(RoleSeeder::class);
        $this->call(GallerySeeder::class);
    }
1285564
public function run()
    {
        $table = $this->table(CMS_TABLE_GROUPS);
        $table->insert($this->records)->save();
    }
349788
public function run()
	{
		$this->echoLoadingTags();

		$assets = CoreAsset::register($this->view);

		if ($this->theme === true) { // Register the theme
			ThemeAsset::register($this->view);
		}

		if (isset($this->options['language'])) {
			$assets->language = $this->options['language'];
		}

		$assets->googleCalendar = $this->googleCalendar;
		$this->clientOptions['header'] = $this->header;

		$this->view->registerJs(implode("\n", [
			"jQuery('#{$this->options['id']}').fullCalendar({$this->getClientOptions()});",
		]), \yii\web\View::POS_READY);
	}
696670
public function run()
    {
        $this->seed('DataTypesTableSeeder');
        $this->seed('DataRowsTableSeeder');
        $this->seed('MenusTableSeeder');
        $this->seed('MenuItemsTableSeeder');
        $this->seed('RolesTableSeeder');
        $this->seed('PermissionsTableSeeder');
        $this->seed('PermissionRoleTableSeeder');
        //测试数据
        $this->seed('CategoriesTableSeeder');
        $this->seed('UsersTableSeeder');
        $this->seed('PostsTableSeeder');
        $this->seed('PagesTableSeeder');
        $this->seed('SettingsTableSeeder');
        $this->seed('TranslationsTableSeeder');
    }
894814
public function run()
    {
        $this->down();
        DB::transaction(function() {

            DB::table('tbl_widget_types')->insert([
                'id'          => 1,
                'slug'        => 'default',
                'name'        => 'Default Widget',
                'description' => 'Default widget type',
            ]);
            $typeId = DB::getPdo()->lastInsertId();
            DB::table('tbl_widgets')->insert([
                'type_id'    => $typeId,
                'name'       => 'Content',
                'created_at' => Carbon::now(),
            ]);
        });
        $schemasPath     = __DIR__ . DIRECTORY_SEPARATOR . '../schemas';
        $viewsSchemaPath = $schemasPath . DIRECTORY_SEPARATOR . 'default_widgets.sql';
        if (file_exists($viewsSchemaPath)) {
            DB::unprepared(file_get_contents($viewsSchemaPath));
        }
    }