Skip to content

Instantly share code, notes, and snippets.

@HueJack
Last active December 11, 2023 11:55
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save HueJack/96d02c872abd08c30e63b098ce0865de to your computer and use it in GitHub Desktop.
Save HueJack/96d02c872abd08c30e63b098ce0865de to your computer and use it in GitHub Desktop.
Битрикс: создание таблицы из ORM сущности
use Bitrix\Main\Application;
use Bitrix\Main\Entity\Base;
if (!Application::getConnection()->isTableExists(Base::getInstance('\Namespace\OrmNameTable')->getDBTableName())) {
Base::getInstance('\Namespace\OrmNameTable')->createDBTable();
}
@sukhikh18
Copy link

Из кода не понятно откуда взялось Base (Bitrix\Main\Entity\Base).

@HueJack
Copy link
Author

HueJack commented Jun 4, 2021

Из кода не понятно откуда взялось Base (Bitrix\Main\Entity\Base).

Спасибо за замечание, поправил

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment