mirror of
https://github.com/Karaka-Management/oms-Admin.git
synced 2026-02-14 03:28:41 +00:00
remove db prefix
This commit is contained in:
parent
4f1a645fb5
commit
f0eade1781
|
|
@ -40,7 +40,6 @@ final class Installer extends InstallerAbstract
|
||||||
|
|
||||||
$sqlite = new SQLiteConnection([
|
$sqlite = new SQLiteConnection([
|
||||||
'db' => 'sqlite',
|
'db' => 'sqlite',
|
||||||
'prefix' => '',
|
|
||||||
'database' => __DIR__ . '/../../../phpOMS/Localization/Defaults/localization.sqlite',
|
'database' => __DIR__ . '/../../../phpOMS/Localization/Defaults/localization.sqlite',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
@ -66,8 +65,7 @@ final class Installer extends InstallerAbstract
|
||||||
$con = $dbPool->get();
|
$con = $dbPool->get();
|
||||||
|
|
||||||
$query = new Builder($con);
|
$query = new Builder($con);
|
||||||
$query->prefix($con->getPrefix())
|
$query->insert('country_name', 'country_code2', 'country_code3', 'country_numeric')
|
||||||
->insert('country_name', 'country_code2', 'country_code3', 'country_numeric')
|
|
||||||
->into('country');
|
->into('country');
|
||||||
|
|
||||||
$querySqlite = new Builder($sqlite);
|
$querySqlite = new Builder($sqlite);
|
||||||
|
|
@ -100,8 +98,7 @@ final class Installer extends InstallerAbstract
|
||||||
$con = $dbPool->get();
|
$con = $dbPool->get();
|
||||||
|
|
||||||
$query = new Builder($con);
|
$query = new Builder($con);
|
||||||
$query->prefix($con->getPrefix())
|
$query->insert('language_name', 'language_native', 'language_639_1', 'language_639_2T', 'language_639_2B', 'language_639_3')
|
||||||
->insert('language_name', 'language_native', 'language_639_1', 'language_639_2T', 'language_639_2B', 'language_639_3')
|
|
||||||
->into('language');
|
->into('language');
|
||||||
|
|
||||||
$querySqlite = new Builder($sqlite);
|
$querySqlite = new Builder($sqlite);
|
||||||
|
|
@ -136,8 +133,7 @@ final class Installer extends InstallerAbstract
|
||||||
$con = $dbPool->get();
|
$con = $dbPool->get();
|
||||||
|
|
||||||
$query = new Builder($con);
|
$query = new Builder($con);
|
||||||
$query->prefix($con->getPrefix())
|
$query->insert('currency_id', 'currency_name', 'currency_code', 'currency_number', 'currency_symbol', 'currency_subunits', 'currency_decimal', 'currency_countries')
|
||||||
->insert('currency_id', 'currency_name', 'currency_code', 'currency_number', 'currency_symbol', 'currency_subunits', 'currency_decimal', 'currency_countries')
|
|
||||||
->into('currency');
|
->into('currency');
|
||||||
|
|
||||||
$querySqlite = new Builder($sqlite);
|
$querySqlite = new Builder($sqlite);
|
||||||
|
|
|
||||||
|
|
@ -158,8 +158,7 @@ final class AccountMapper extends DataMapperAbstract
|
||||||
$result = null;
|
$result = null;
|
||||||
|
|
||||||
$query = new Builder(self::$db);
|
$query = new Builder(self::$db);
|
||||||
$result = $query->prefix(self::$db->getPrefix())
|
$result = $query->select('account_id', 'account_login', 'account_password', 'account_password_temp', 'account_tries')
|
||||||
->select('account_id', 'account_login', 'account_password', 'account_password_temp', 'account_tries')
|
|
||||||
->from('account')
|
->from('account')
|
||||||
->where('account_login', '=', $login)
|
->where('account_login', '=', $login)
|
||||||
->execute()->fetchAll();
|
->execute()->fetchAll();
|
||||||
|
|
|
||||||
|
|
@ -45,18 +45,12 @@ final class AddressMapper extends DataMapperAbstract
|
||||||
/**
|
/**
|
||||||
* Has one relation.
|
* Has one relation.
|
||||||
*
|
*
|
||||||
* @todo Orange-Management/phpOMS#224
|
|
||||||
* Implement composite models.
|
|
||||||
* If a column is defined only that column value should get populated in the model and not the full model!
|
|
||||||
* OwnsOne, HasOne, use single value instead of full model defined in the mapper.
|
|
||||||
*
|
|
||||||
* @var array<string, array{mapper:string, self:string, by?:string}>
|
* @var array<string, array{mapper:string, self:string, by?:string}>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static array $ownsOne = [
|
protected static array $ownsOne = [
|
||||||
'country' => [
|
'country' => [
|
||||||
'mapper' => CountryMapper::class,
|
'mapper' => CountryMapper::class,
|
||||||
//'column' => '',
|
|
||||||
'self' => 'address_country',
|
'self' => 'address_country',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -145,15 +145,14 @@ final class LocalizationMapper extends DataMapperAbstract
|
||||||
*
|
*
|
||||||
* @param mixed $primaryKey Key
|
* @param mixed $primaryKey Key
|
||||||
* @param int $relations Load relations
|
* @param int $relations Load relations
|
||||||
* @param mixed $fill Object to fill
|
|
||||||
* @param int $depth Relation depth
|
* @param int $depth Relation depth
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public static function get($primaryKey, int $relations = RelationType::ALL, $fill = null, int $depth = 1)
|
public static function get($primaryKey, int $relations = RelationType::ALL, int $depth = 1)
|
||||||
{
|
{
|
||||||
return parent::get($primaryKey, $relations, $fill, 1);
|
return parent::get($primaryKey, $relations, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user