Skip to content

Commit

Permalink
added seeder class
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanwilliammd committed Nov 29, 2024
1 parent d04bd77 commit dfbd227
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
27 changes: 27 additions & 0 deletions database/seeders/LoincAnswerSeeder.php.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php
namespace Database\Seeders;

use JeroenZwart\CsvSeeder\CsvSeeder;
use DB;

class Icd10Seeder extends CsvSeeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function __construct(){
$this->file = base_path().'/database/seeders/csv/loinc_answer.csv';
$this->tablename = config('satusehatintegration.loinc_answer_table_name');
$this->delimiter = ';';
}

public function run()
{
// Recommended when importing larger CSVs
DB::disableQueryLog();

parent::run();
}
}
27 changes: 27 additions & 0 deletions database/seeders/LoincSeeder.php.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php
namespace Database\Seeders;

use JeroenZwart\CsvSeeder\CsvSeeder;
use DB;

class Icd10Seeder extends CsvSeeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function __construct(){
$this->file = base_path().'/database/seeders/csv/loinc.csv';
$this->tablename = config('satusehatintegration.loinc_table_name');
$this->delimiter = ';';
}

public function run()
{
// Recommended when importing larger CSVs
DB::disableQueryLog();

parent::run();
}
}
File renamed without changes.

0 comments on commit dfbd227

Please sign in to comment.