Skip to content

Commit

Permalink
mssql
Browse files Browse the repository at this point in the history
  • Loading branch information
gam6itko committed May 25, 2024
1 parent 28ab86a commit 42b642f
Showing 1 changed file with 11 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,32 +88,28 @@ private function makeTables(): void

private function fillData(): void
{
$ru = 1;
$en = 2;
$en = 1;
$this->getDatabase()->table('locale')->insertMultiple(
['id', 'code'],
['code'],
[
[$ru, 'ru'],
[$en, 'en'],
['en'],
],
);
$this->getDatabase()->table('country')->insertMultiple(
['id', 'name', 'code', 'is_friendly'],
['name', 'code', 'is_friendly'],
[
[1, 'Russia', 'RUS', true],
[2, 'USA', 'USA', true],
[3, 'China', 'CHN', true],
[4, 'Boateng', 'GOAL', true],
['Russia', 'RUS', true],
['USA', 'USA', true],
['China', 'CHN', true],
],
);

$t = 0;
$this->getDatabase()->table('translation')->insertMultiple(
['id', 'country_id', 'locale_id', 'title'],
['country_id', 'locale_id', 'title'],
[
[++$t, 1, $en, 'Russia on english'],
[++$t, 2, $en, 'America on english'],
[++$t, 2, $en, 'China on english'],
[1, $en, 'Russia on english'],
[2, $en, 'America on english'],
[3, $en, 'China on english'],
],
);
}
Expand Down

0 comments on commit 42b642f

Please sign in to comment.