{"id":316397,"date":"2021-01-15T03:00:16","date_gmt":"2021-01-15T03:00:16","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=316397"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=316397","title":{"rendered":"\u0420\u0430\u0441\u0448\u0438\u0440\u044f\u0435\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 Laravel \u0437\u0430 \u0441\u0447\u0435\u0442 Postgres"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u0412\u0441\u0435, \u043a\u0442\u043e \u043e\u0434\u043d\u0430\u0436\u0434\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u043b \u0432\u0435\u0441\u0442\u0438 \u0431\u043e\u043b\u0435\u0435-\u043c\u0435\u043d\u0435\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 Enterprise \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 Laravel, \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 Laravel \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438, \u0443\u0436\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e.<\/p>\n<p>\u0410 \u0435\u0441\u043b\u0438 \u0432\u044b, \u043a\u0430\u043a \u0438 \u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0432 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 Postgres, \u0442\u043e \u0440\u0430\u043d\u043e \u0438\u043b\u0438 \u043f\u043e\u0437\u0434\u043d\u043e \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u043f\u043b\u044e\u0448\u043a\u0438 \u044d\u0442\u043e\u0439 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0421\u0423\u0411\u0414, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a: \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0435\u0439\u043d\u0442\u044b, \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f, \u043d\u043e\u0432\u044b\u0435 \u0442\u0438\u043f\u044b \u0438 \u0442\u0434&#8230;<\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f, \u043a\u0430\u043a \u0432\u044b \u0443\u0436\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043f\u0440\u043e Postgres, \u043f\u0440\u043e \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 Laravel, \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u0441\u0435 \u0432\u043c\u0435\u0441\u0442\u0435 \u043f\u043e\u0434\u0440\u0443\u0436\u0438\u0442\u044c, \u0432 \u043e\u0431\u0449\u0435\u043c, \u043e\u0431\u043e \u0432\u0441\u0435\u043c \u0442\u043e\u043c, \u0447\u0435\u0433\u043e \u043d\u0430\u043c \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f\u0445 \u041b\u0430\u0440\u044b.<\/p>\n<p>\u041d\u0443 \u0430 \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u043d\u0435 \u0445\u043e\u0447\u0435\u0442 \u043f\u043e\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 Laravel, \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442, \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u044e\u0449\u0438\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 Laravel \u0438 Postgres \u043f\u043e \u044d\u0442\u043e\u0439 <a href=\"https:\/\/github.com\/umbrellio\/laravel-pg-extensions\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0435<\/a> \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445. <\/p>\n<p>\u041d\u043e \u044f \u0432\u0441\u0435 \u0436\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043d\u0435 \u043f\u0440\u043e\u043b\u0438\u0441\u0442\u044b\u0432\u0430\u0442\u044c, \u0430 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0441\u0435 \u0434\u043e \u043a\u043e\u043d\u0446\u0430.<\/p>\n<h2>\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u0438<\/h2>\n<p>\u0412\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u0432 Laravel:<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  declare(strict_types=1);  use Illuminate\\Database\\Migrations\\Migration; use Illuminate\\Database\\Schema\\Blueprint; use Illuminate\\Support\\Facades\\Schema;  class CreateDocuments extends Migration {     private const TABLE = 'documents';      public function up()     {         Schema::create(static::TABLE, function (Blueprint $table) {             $table-&gt;bigIncrements('id');             $table-&gt;timestamps();             $table-&gt;softDeletes();             $table-&gt;string('number');             $table-&gt;date('issued_date')-&gt;nullable();             $table-&gt;date('expiry_date')-&gt;nullable();             $table-&gt;string('file');             $table-&gt;bigInteger('author_id');             $table-&gt;bigInteger('type_id');             $table-&gt;foreign('author_id')-&gt;references('id')-&gt;on('users');             $table-&gt;foreign('type_id')-&gt;references('id')-&gt;on('document_types');         });     }      public function down()     {         Schema::dropIfExists(static::TABLE);     } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041d\u043e, \u0442\u0443\u0442 \u0432\u044b \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b\u0438 \u0441\u0442\u0430\u0442\u044c\u044e \u043d\u0430 \u0445\u0430\u0431\u0440\u0435 \u043f\u0440\u043e \u043d\u043e\u0432\u044b\u0435 \u0442\u0438\u043f\u044b \u0432 Postgres, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <strong>tsrange<\/strong> \u0438 \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044e \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u044d\u0442\u043e\u0433\u043e&#8230;<\/p>\n<pre><code class=\"php\">$table-&gt;addColumn('tsrange', 'period')-&gt;nullable();<\/code><\/pre>\n<p>\u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e, \u043d\u043e \u0432\u0430\u0448 \u043f\u0435\u0440\u0444\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0437\u043c \u043d\u0430\u0432\u043e\u0434\u0438\u0442 \u0432\u0430\u0441 \u043d\u0430 \u043c\u044b\u0441\u043b\u044c, \u0430 \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043d\u0435 \u0437\u0430\u043b\u0435\u0437\u0442\u044c \u0432 \u0441\u043e\u0440\u0446\u044b \u0438 \u043d\u0435 \u043f\u0440\u043e\u043f\u0430\u0442\u0447\u0438\u0442\u044c Laravel, \u0432\u0435\u0434\u044c \u044f \u0431\u0443\u0434\u0443 \u0447\u0430\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e, \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<pre><code>$table-&gt;tsRange('period')-&gt;nullable();<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u043d\u0434\u043e\u0440\u043e\u0432\u0441\u043a\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0430\u0442\u0447\u0438\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u044d\u0442\u043e\u0433\u043e, \u0437\u0430\u0433\u043b\u044f\u043d\u0438\u0442\u0435 \u043f\u043e\u0434 \u0441\u043f\u043e\u0439\u043b\u0435\u0440:<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u0430\u043a \u043f\u0440\u043e\u043f\u0430\u0442\u0447\u0438\u0442\u044c Laravel \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438<\/summary>\n<div class=\"spoiler__content\">\n<h4>\u041f\u0430\u0442\u0447\u0438\u043c Blueprint<\/h4>\n<pre><code class=\"php\">&lt;?php  Blueprint::macro('tsRange', function (string $columnName) {   return $this-&gt;addColumn('tsrange', $columnName); }); <\/code><\/pre>\n<h4>\u041f\u0430\u0442\u0447\u0438\u043c PostgresGrammar<\/h4>\n<pre><code class=\"php\">&lt;?php  PostgresGrammar::macro('typeTsrange', function () {   rerurn 'tsrange'; }); <\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440, \u0442\u0438\u043f\u0430 ExtendDatabaseProvider:<\/p>\n<pre><code class=\"php\">&lt;?php  use Illuminate\\Support\\ServiceProvider;  class DatabaseServiceProvider extends ServiceProvider {     public function register()     {         Blueprint::macro('tsRange', function (string $columnName) {             return $this-&gt;addColumn('tsrange', $columnName);         });          PostgresGrammar::macro('typeTsrange', function () {             return 'tsrange';         });     } }<\/code><\/pre>\n<p>\u0412\u0440\u043e\u0434\u0435 \u0431\u044b \u0432\u0441\u0435, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044e, \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442..<\/p>\n<\/div>\n<\/details>\n<p>\u0418 \u043d\u0435 \u0432\u0430\u0436\u043d\u043e, \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u043b\u0438 \u0432\u044b \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 Laravel \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0411\u0414 \u0438\u043b\u0438 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043c\u0430\u043a\u0440\u043e\u0441\u0430\u043c\u0438 \u0438 \u043c\u0438\u043a\u0441\u0438\u043d\u0430\u043c\u0438 \u0438\u0437 MacroableTrait, \u043a\u0440\u0443\u0433\u0438 \u0430\u0434\u0430 \u0435\u0449\u0435 \u043d\u0435 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438\u0441\u044c.<\/p>\n<h3>\u041a\u0440\u0443\u0433\u0438 \u0430\u0434\u0430 (\u0447\u0430\u0441\u0442\u044c 1)<\/h3>\n<p>\u0418 \u0432\u043e\u0442 \u0432\u044b \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0432\u0441\u0435 \u044d\u0442\u043e \u043a\u0440\u0443\u0442\u0438\u0442\u0435, \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u0447\u0430\u0441\u044b, \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 +100500 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430, \u0438 \u0440\u0435\u0448\u0438\u043b\u0438 \u0432\u044b\u043a\u0430\u0442\u0438\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u0443\u044e \u0442\u0430\u0441\u043a\u0443 \u0432 \u0433\u0438\u0442\u043b\u0430\u0431. \u041c\u044b \u0436\u0435 \u0438\u0434\u0435\u043c \u0432 \u043d\u043e\u0433\u0443 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0438 \u0442\u0430\u043c \u0443 \u043d\u0430\u0441 \u0414\u043e\u043a\u0435\u0440, CI, \u0442\u0435\u0441\u0442\u044b \u0438 \u0442\u0434&#8230;<\/p>\n<p>\u0418 \u0432\u043e\u0442 \u043c\u044b \u0437\u0430\u043c\u0435\u0447\u0430\u0435\u043c, \u0447\u0442\u043e \u043d\u0430\u0448\u0438 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0432 &#171;\u043d\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c&#187; \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0438\u0437-\u0437\u0430 \u043e\u0448\u0438\u0431\u043a\u0438:<\/p>\n<pre><code>Doctrine\\DBAL\\Driver\\PDOException: SQLSTATE[08006] [7] FATAL:  sorry, too many clients already<\/code><\/pre>\n<p>\u0418 \u0432\u043e\u0442 \u0442\u044b \u0441\u0438\u0434\u0438\u0448\u044c \u0438 \u0434\u0443\u043c\u0430\u0435\u0448\u044c, \u0447\u0442\u043e \u0442\u044b \u043d\u0435 \u0442\u0430\u043a \u0434\u0435\u043b\u0430\u0435\u0448\u044c, \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0448\u044c \u043f\u043e\u0434\u043f\u0438\u0445\u0438\u0432\u0430\u0442\u044c \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 .env \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438\u0437 CI \u0432\u0430\u0448\u0435\u0433\u043e GitLab, \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u0434, \u0432\u043c\u0435\u0441\u0442\u043e \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u0432 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b, \u0440\u0430\u0441\u043f\u0438\u0445\u0438\u0432\u0430\u0442\u044c \u0432\u0435\u0437\u0434\u0435 \u0438 \u0432\u0441\u044e\u0434\u0443 \u0434\u0435\u0431\u0430\u0433\u0438, \u0432\u0441\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e, \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435\u0442. \u0410 \u0432 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430\u0445 CI \u043d\u0435 \u0442\u0430\u043a-\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u0435\u0431\u0430\u0436\u0438\u0442\u044c, \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0448\u044c \u043f\u0438\u0445\u0430\u0442\u044c \u0432\u0435\u0437\u0434\u0435 \u0438 \u0432\u0441\u044e\u0434\u0443 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0438 \u044d\u0442\u043e \u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442, \u0432\u0435\u0434\u044c \u043e\u0448\u0438\u0431\u043a\u0430 \u0433\u0434\u0435-\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438, \u0432 vendor. \u041d\u043e \u0442\u044b \u043e\u0431 \u044d\u0442\u043e\u043c \u0435\u0449\u0435 \u043f\u043e\u043a\u0430 \u043d\u0435 \u0437\u043d\u0430\u0435\u0448\u044c. <\/p>\n<p>\u0417\u0430\u0442\u0435\u043c, \u0441\u043f\u0443\u0441\u0442\u044f \u0446\u0435\u043b\u044b\u0439 \u0434\u043d\u044f \u0433\u0443\u0433\u043b\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0438, \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0442\u0430\u043a \u0438 \u043d\u0435\u0442, \u043a\u0443\u0447\u0430 \u0431\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u043e\u0432\u0435\u0442\u043e\u0432.<\/p>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u0435\u0448\u044c \u043e\u0449\u0443\u0449\u0430\u0442\u044c \u043f\u043e-\u0442\u0438\u0445\u043e\u043d\u044c\u043a\u0443 \u0441\u0435\u0431\u044f \u0438\u0434\u0438\u043e\u0442\u043e\u043c (\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u0435 \u0437\u0430 \u043c\u043e\u0439 \u0444\u0440\u0430\u043d\u0446\u0443\u0437\u0441\u043a\u0438\u0439), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u043d\u0438 \u043d\u0430 \u0447\u0442\u043e, \u0432 \u043f\u0440\u044f\u043c\u043e\u043c \u0441\u043c\u044b\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430, \u0441\u043b\u043e\u0432\u043d\u043e \u0442\u044b \u0448\u043a\u043e\u043b\u044c\u043d\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u043e\u043b\u044c\u043a\u043e-\u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f \u0438\u0437 \u0448\u043a\u043e\u043b\u044b, \u0434\u0435\u043d\u044c \u0443\u0431\u0438\u0442, \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043d\u0435 \u0440\u0435\u0448\u0435\u043d\u0430.<\/p>\n<h3>\u0412\u0430\u0436\u0435\u043d \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442<\/h3>\n<p>\u041e\u0448\u0438\u0431\u043a\u0430 <strong>sorry, too many clients already<\/strong> \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043f\u043e \u043b\u044e\u0431\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435.<\/p>\n<p>\u0422\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0448\u044c\u0441\u044f \u043a \u043d\u0430\u0447\u0430\u043b\u0443, \u0433\u0443\u0433\u043b\u0438\u0448\u044c \u0442\u043e \u0441 \u0447\u0435\u0433\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u043b, \u0441 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u043c\u0430\u043a\u0440\u043e\u0441\u0430\u043c\u0438 \u0432 PostgresGrammar \u043d\u043e\u0432\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0438 \u0432\u043e\u0442 \u0447\u0443\u0434\u043e, \u0442\u044b \u043d\u0430\u0442\u044b\u043a\u0430\u0435\u0448\u044c\u0441\u044f \u043d\u0430 \u043f\u043e\u0445\u043e\u0436\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u043d\u043e \u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0432\u0437\u0433\u043b\u044f\u0434\u0430 \u043e\u043d\u0430 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0430\u044f&#8230;. \u0433\u0434\u0435 \u043a\u0442\u043e-\u0442\u043e, \u043a\u0430\u043a \u0438 \u0442\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u043b \u043d\u043e\u0432\u044b\u0439 \u0442\u0438\u043f \u0438 \u0443 \u043d\u0435\u0433\u043e \u043d\u0435 \u0437\u0430\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0411\u0414. \u041d\u043e \u0443 \u043d\u0435\u0433\u043e \u043e\u0448\u0438\u0431\u043a\u0430 \u0434\u0440\u0443\u0433\u0430\u044f:<\/p>\n<pre><code>Doctrine\\DBAL\\DBALException: Unknown database type tsrange requested, Doctrine\\DBAL\\Platforms\\PostgreSQL100Platform may not support it.<\/code><\/pre>\n<p>\u041e\u0442\u0447\u0430\u044f\u0432\u0448\u0438\u0441\u044c, \u043f\u0435\u0440\u0432\u0430\u044f \u043c\u044b\u0441\u043b\u044c, \u0430 \u0447\u0435\u043c \u0447\u0435\u0440\u0442 \u043d\u0435 \u0448\u0443\u0442\u0438\u0442&#8230; \u0442\u044b \u043f\u0440\u043e\u0431\u0443\u0435\u0448\u044c \u0447\u0443\u0436\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u0434\u0430\u0436\u0435 \u0441\u0430\u043c\u044b\u0435 \u0430\u0431\u0441\u0443\u0440\u0434\u043d\u044b\u0435 \u0438 \u0432 \u043e\u0434\u0438\u043d \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0434\u0435\u043d\u044c \u0432\u0441\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u0412\u044b \u0443\u0436\u0435 \u0434\u043e\u0433\u0430\u0434\u0430\u043b\u0438\u0441\u044c \u0432 \u0447\u0435\u043c \u0434\u0435\u043b\u043e?<\/p>\n<h3>\u0411\u0430\u0440\u0430\u0431\u0430\u043d\u043d\u0430\u044f \u0434\u0440\u043e\u0431\u044c<\/h3>\n<blockquote>\n<p>Any Doctrine type that you use has to be registered with \\Doctrine\\DBAL\\Types\\Type::addType().<\/p>\n<\/p>\n<p>You can get a list of all the known types with  \\Doctrine\\DBAL\\Types\\Type::getTypesMap().<\/p>\n<\/p>\n<p>If this error occurs during database introspection then you might  have forgotten to register all database types for a Doctrine Type. <\/p>\n<\/p>\n<p>Use AbstractPlatform#registerDoctrineTypeMapping() or have your  custom types implement Type#getMappedDatabaseTypes(). <\/p>\n<\/p>\n<p>If the type name is empty you might have a problem with the cache or forgot some mapping information.<\/p>\n<\/blockquote>\n<p>\u0418\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u043f\u0435\u0442\u044c \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0438\u043f \u0432 Doctrine\\Dbal \u043f\u0440\u0435\u0436\u0434\u0435, \u0447\u0435\u043c \u0434\u043e \u0432\u0430\u0448\u0435\u0433\u043e Database Connection \u0434\u043e\u0439\u0434\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u0447\u0442\u043e \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u0442\u0438\u043f\u044b (\u043f\u043e\u0434 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u043c\u0438 \u044f \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u044e \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0441\u0442\u044c \u0432 Postgres, \u043d\u043e \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0432 \u0437\u0430\u0432\u0435\u0442\u043d\u043e\u043c getTypesMap \u0432 \u043d\u0435\u0434\u0440\u0430\u0445 Doctrine.<\/p>\n<h2>\u041a\u0440\u0443\u0433\u0438 \u0430\u0434\u0430 (\u0447\u0430\u0441\u0442\u044c 2)<\/h2>\n<p>\u0412\u044b \u043b\u0435\u0437\u0435\u0442\u0435 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438, \u043a\u0443\u0434\u0430-\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0433\u043b\u0443\u0431\u043e\u043a\u043e \u0432 vendor \u0432 \u043d\u0435\u0434\u0440\u044b doctrine\\dbal&#8230;<\/p>\n<p>\u0421\u043f\u0443\u0441\u0442\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043a\u043e\u043b-\u0432\u043e \u0432\u043f\u0443\u0441\u0442\u0443\u044e \u043f\u043e\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u044b\u0445 \u0447\u0430\u0441\u043e\u0432, \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0438\u043f \u0432 Doctrine, \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441 \u0434\u0435\u0441\u044f\u0442\u043e\u043a \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438, \u043f\u043e\u043c\u0438\u043c\u043e \u043f\u0440\u043e\u0447\u0435\u0433\u043e, \u0435\u0449\u0435 \u0438 \u0441 \u0434\u0435\u0441\u044f\u0442\u043e\u043a \u043c\u0435\u0442\u043e\u0434\u043e\u0432.<\/p>\n<p><strong>\u041e \u0431\u043e\u0436\u0435, \u0447\u0430\u0441\u0442\u044c \u0438\u0437 \u043d\u0438\u0445 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0435!<\/strong><\/p>\n<p>\u0412\u0441\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043c\u043e\u0433\u0443, \u044d\u0442\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043c\u044b\u0441\u043b\u0438 \u0438 \u0441\u043b\u043e\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0445\u043e\u0434\u044f\u0442 \u0438\u0437 \u0432\u0430\u0448\u0438\u0445 \u0443\u0441\u0442..<\/p>\n<p>\u0420\u0443\u043a\u0438 \u043e\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e..<\/p>\n<h2>\u0421\u043f\u0430\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u0440\u0443\u0433<\/h2>\n<p>\u041d\u0435 \u0431\u0443\u0434\u0443 \u0445\u043e\u0434\u0438\u0442\u044c \u0432\u043e\u043a\u0440\u0443\u0433, \u0434\u0430 \u043e\u043a\u043e\u043b\u043e. <\/p>\n<p>\u042d\u0442\u043e, \u043a\u0430\u043a \u0432\u044b \u0443\u0436\u0435 \u043f\u043e\u043d\u044f\u043b\u0438, \u0431\u044b\u043b \u043c\u043e\u0439 \u043b\u0438\u0447\u043d\u044b\u0439 \u043e\u043f\u044b\u0442, \u043c\u043e\u0438 \u0440\u0443\u043a\u0438 \u043d\u0435 \u043e\u043f\u0443\u0441\u0442\u0438\u043b\u0438\u0441\u044c, \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u044f \u043f\u043e\u0431\u0435\u0434\u0438\u043b \u044d\u0442\u043e\u0442 \u0432\u0435\u043b\u0438\u043a\u0438\u0439 \u0438 \u0443\u0436\u0430\u0441\u043d\u044b\u0439 Doctrine.<\/p>\n<h2>\u041f\u043e\u0434\u0443\u043c\u0430\u0435\u043c \u043e \u0431\u0443\u0434\u0443\u0449\u0435\u043c<\/h2>\n<p>\u0410 \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u044f \u043d\u0435 \u043f\u0435\u0440\u0432\u044b\u0439, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043d\u0435 \u043c\u043d\u0435 \u043e\u0434\u043d\u043e\u043c\u0443 \u043d\u0430\u0434\u043e \u044d\u0442\u043e, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0448\u0438\u0445 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 \u043b\u044e\u0431\u043e\u043c\u0443, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0442\u0438\u043f\u044b, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e, \u0438 \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043b\u0435\u0437\u0442\u044c \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 Laravel \u0438 Doctrine, \u0438 \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043f\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443 \u0430\u0432\u0442\u043e\u0431\u043e\u0442\u043e\u0432. <\/p>\n<p>\u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u043a\u0430\u043a \u041e\u043f\u0442\u0438\u043c\u0443\u0441 \u041f\u0440\u0430\u0439\u043c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0442\u0440\u0435\u0439\u043b\u0435\u0440\u0430 \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0430\u043b \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043b\u0435\u0442\u0430\u0442\u044c, \u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u0430\u0432\u0442\u043e\u0431\u043e\u0442\u044b, \u0431\u044b\u043b\u0438 \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u043e\u0434\u0430 \u0434\u043e\u043f. \u043e\u0440\u0443\u0434\u0438\u044f\u043c\u0438.<\/p>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u0435\u0431\u0435 \u0442\u0430\u043a\u043e\u0439 DatabaseProvider, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0432\u043d\u0435\u0434\u0440\u044f\u0435\u043c \u0432 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043e\u0442 Laravel, \u043e\u043f\u0438\u0448\u0435\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0431\u0443\u0434\u0443\u0449\u0438\u0445 Extension-\u043e\u0432 \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0441 \u043f\u043e\u0445\u043e\u0436\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043b\u0435\u0433\u043a\u043e \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u0438\u043b\u0438\u0441\u044c \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0443, \u0438 \u0437\u0430\u0431\u044b\u0442\u044c, \u043a\u0430\u043a \u0441\u0442\u0440\u0430\u0448\u043d\u044b\u0439 \u0441\u043e\u043d \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 Doctrine.<\/p>\n<h2>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b<\/h2>\n<p>\u042d\u0442\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0432 \u0441\u0442\u0438\u043b\u0435 \u041e\u041e\u041f, \u0441\u0431\u043e\u043a\u0443, \u043f\u043e \u0442\u0438\u043f\u0443 \u043a\u0430\u043a \u0442\u0440\u0435\u0439\u0442\u044b \u0438\u043d\u044c\u0435\u043a\u0442\u044f\u0442\u0441\u044f \u0432 \u043a\u043b\u0430\u0441\u0441\u044b:<\/p>\n<ul>\n<li>\n<p><strong>Blueprint<\/strong> &#8212; \u043e\u0431\u044a\u0435\u043a\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439\u0441\u044f \u0432 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f\u0445, \u043f\u043e \u0441\u0443\u0442\u0438 \u0431\u0438\u043b\u0434\u0435\u0440<\/p>\n<\/li>\n<li>\n<p><strong>Builder<\/strong> &#8212; \u043e\u043d \u0436\u0435 \u0444\u0430\u0441\u0430\u0434 Schema<\/p>\n<\/li>\n<li>\n<p><strong>PostgresGrammar<\/strong> &#8212; \u043e\u0431\u044a\u0435\u043a\u0442 \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 Blueprint-\u0430 \u0432 SQL-\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p><strong>Types<\/strong> &#8212; \u043d\u0430\u0448\u0438 \u0442\u0438\u043f\u044b<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435, \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u043c\u0435\u0448\u0438\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439 \u0432\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b Laravel \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0438 \u043e\u0432\u0446\u044b \u0431\u044b\u043b\u0438 \u0446\u0435\u043b\u044b \u0438 \u0432\u043e\u043b\u043a\u0438 \u0441\u044b\u0442\u044b, \u0438\u043c\u0435\u044e \u0432\u0432\u0438\u0434\u0443, \u0447\u0442\u043e\u0431\u044b IDE \u0431\u044b\u043b \u0441\u0447\u0430\u0441\u0442\u043b\u0438\u0432, \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u0430 \u043d\u0430\u0448 \u043a\u043e\u0434 \u0431\u044b\u043b \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043b\u0430\u0441\u0441\u0430, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u0442\u0430\u043a\u043e\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  namespace Umbrellio\\Postgres\\Extensions;  use Illuminate\\Support\\Traits\\Macroable; use Umbrellio\\Postgres\\Extensions\\Exceptions\\MacroableMissedException; use Umbrellio\\Postgres\\Extensions\\Exceptions\\MixinInvalidException;  abstract class AbstractExtension extends AbstractComponent {     abstract public static function getMixins(): array;      abstract public static function getName(): string;      public static function getTypes(): array     {         return [];     }      final public static function register(): void     {         collect(static::getMixins())-&gt;each(static function ($extension, $mixin) {             if (!is_subclass_of($mixin, AbstractComponent::class)) {                 throw new MixinInvalidException(sprintf(                     'Mixed class %s is not descendant of %s.',                     $mixin,                     AbstractComponent::class                 ));             }             if (!method_exists($extension, 'mixin')) {                 throw new MacroableMissedException(sprintf('Class %s doesn\u2019t use Macroable Trait.', $extension));             }             \/** @var Macroable $extension *\/             $extension::mixin(new $mixin());         });     } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043f\u0440\u043e\u043f\u0430\u0442\u0447\u0438\u043c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u043e \u0443\u043c\u0435\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u044d\u0442\u0438\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c \u0438 \u0440\u0435\u0448\u0430\u043b\u043e \u0432\u0441\u0435 \u043d\u0430\u0448\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u043e \u0432 \u043d\u0443\u0436\u043d\u044b\u0435 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b Laravel \u043d\u0430\u0448\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0440\u0435\u0448\u0430\u043b\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0441 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0435\u0439 \u0442\u0438\u043f\u043e\u0432 \u0432 Doctrine.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0430\u0442\u0447\u0438\u043c PostgresConnection<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  namespace Umbrellio\\Postgres;  use DateTimeInterface; use Doctrine\\DBAL\\Connection; use Doctrine\\DBAL\\Events; use Illuminate\\Database\\PostgresConnection as BasePostgresConnection; use Illuminate\\Support\\Traits\\Macroable; use PDO; use Umbrellio\\Postgres\\Extensions\\AbstractExtension; use Umbrellio\\Postgres\\Extensions\\Exceptions\\ExtensionInvalidException; use Umbrellio\\Postgres\\Schema\\Builder; use Umbrellio\\Postgres\\Schema\\Grammars\\PostgresGrammar; use Umbrellio\\Postgres\\Schema\\Subscribers\\SchemaAlterTableChangeColumnSubscriber;  class PostgresConnection extends BasePostgresConnection {     use Macroable;      private static $extensions = [];      final public static function registerExtension(string $extension): void     {         if (!is_subclass_of($extension, AbstractExtension::class)) {             throw new ExtensionInvalidException(sprintf(                 'Class %s must be implemented from %s',                 $extension,                 AbstractExtension::class             ));         }         self::$extensions[$extension::getName()] = $extension;     }      public function getSchemaBuilder()     {         if ($this-&gt;schemaGrammar === null) {             $this-&gt;useDefaultSchemaGrammar();         }         return new Builder($this);     }      public function useDefaultPostProcessor(): void     {         parent::useDefaultPostProcessor();          $this-&gt;registerExtensions();     }      protected function getDefaultSchemaGrammar()     {         return $this-&gt;withTablePrefix(new PostgresGrammar());     }      private function registerExtensions(): void     {         collect(self::$extensions)-&gt;each(function ($extension) {             \/** @var AbstractExtension $extension *\/             $extension::register();             foreach ($extension::getTypes() as $type =&gt; $typeClass) {                 $this                     -&gt;getSchemaBuilder()                     -&gt;registerCustomDoctrineType($typeClass, $type, $type);             }         });     } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0410 \u0442\u0430\u043a\u0436\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440 \u0438 \u0444\u0430\u0431\u0440\u0438\u043a\u0443 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0411\u0414:<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0430\u0442\u0447\u0438\u043c DatabaseProvider<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  namespace Umbrellio\\Postgres;  use Illuminate\\Database\\DatabaseManager; use Illuminate\\Database\\DatabaseServiceProvider; use Umbrellio\\Postgres\\Connectors\\ConnectionFactory;  class UmbrellioPostgresProvider extends DatabaseServiceProvider {     protected function registerConnectionServices(): void     {         $this-&gt;app-&gt;singleton('db.factory', function ($app) {             return new ConnectionFactory($app);         });          $this-&gt;app-&gt;singleton('db', function ($app) {             return new DatabaseManager($app, $app['db.factory']);         });          $this-&gt;app-&gt;bind('db.connection', function ($app) {             return $app['db']-&gt;connection();         });     } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>\u041f\u0430\u0442\u0447\u0438\u043c ConnectionFactory<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  namespace Umbrellio\\Postgres\\Connectors;  use Illuminate\\Database\\Connection; use Illuminate\\Database\\Connectors\\ConnectionFactory as ConnectionFactoryBase; use Umbrellio\\Postgres\\PostgresConnection;  class ConnectionFactory extends ConnectionFactoryBase {     protected function createConnection($driver, $connection, $database, $prefix = '', array $config = [])     {         if ($resolver = Connection::getResolver($driver)) {             return $resolver($connection, $database, $prefix, $config);         }          if ($driver === 'pgsql') {             return new PostgresConnection($connection, $database, $prefix, $config);         }          return parent::createConnection($driver, $connection, $database, $prefix, $config);     } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<h2>\u041d\u0430\u0447\u0430\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u044b<\/h2>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u043d\u043e\u0432\u043e\u0433\u043e \u0442\u0438\u043f\u0430 tsrange \u0432 \u043d\u0430\u0448\u0438 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438. \u041a\u0430\u043a \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043d\u0430\u0448\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0442\u0435\u043f\u0435\u0440\u044c.<\/p>\n<details class=\"spoiler\">\n<summary>TsRangeExtension.php<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  namespace App\\Extensions\\TsRange;  use App\\Extensions\\TsRange\\Schema\\Grammars\\TsRangeSchemaGrammar; use App\\Extensions\\TsRange\\Schema\\TsRangeBlueprint; use App\\Extensions\\TsRange\\Types\\TsRangeType; use Umbrellio\\Postgres\\Extensions\\AbstractExtension; use Umbrellio\\Postgres\\Schema\\Blueprint; use Umbrellio\\Postgres\\Schema\\Grammars\\PostgresGrammar;  class TsRangeExtension extends AbstractExtension {     public const NAME = TsRangeType::TYPE_NAME;      public static function getMixins(): array     {         return [             TsRangeBlueprint::class =&gt; Blueprint::class,             TsRangeSchemaGrammar::class =&gt; PostgresGrammar::class,             \/\/ ... \u0441\u043f\u0438\u0441\u043e\u043a \u043c\u0438\u043a\u0441\u0438\u043d\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432 \u0441\u0435\u0431\u044f \u043f\u043e\u0447\u0442\u0438 \u043b\u044e\u0431\u043e\u0439 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442 Laravel         ];     }      public static function getName(): string     {         return static::NAME;     }      public static function getTypes(): array     {         return [             static::NAME =&gt; TsRangeType::class,         ];     } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>TsRangeBlueprint.php<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  namespace App\\Extensions\\TsRange\\Schema;  use Illuminate\\Support\\Fluent; use App\\Extensions\\TsRange\\Types\\TsRangeType; use Umbrellio\\Postgres\\Extensions\\Schema\\AbstractBlueprint;  class TsRangeBlueprint extends AbstractBlueprint {     public function tsrange()     {         return function (string $column): Fluent {             return $this-&gt;addColumn(TsRangeType::TYPE_NAME, $column);         };     } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>TsRangeSchemaGrammar.php<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  namespace App\\Extensions\\TsRange\\Schema\\Grammars;  use App\\Extensions\\TsRange\\Types\\TsRangeType; use Umbrellio\\Postgres\\Extensions\\Schema\\Grammar\\AbstractGrammar;  class TsRangeSchemaGrammar extends AbstractGrammar {     protected function typeTsrange()     {         return function (): string {             return TsRangeType::TYPE_NAME;         };     } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<details class=\"spoiler\">\n<summary>TsRangeType.php<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  namespace App\\Extensions\\TsRange\\Types;  use Doctrine\\DBAL\\Platforms\\AbstractPlatform; use Doctrine\\DBAL\\Types\\Type;  class TsRangeType extends Type {     public const TYPE_NAME = 'tsrange';          public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform): string     {         return static::TYPE_NAME;     }      public function convertToPHPValue($value, AbstractPlatform $platform): ?array     {         \/\/...          return $value;       }      public function convertToDatabaseValue($value, AbstractPlatform $platform): ?string     {         \/\/...                return $value;     }      public function getName(): string     {         return self::TYPE_NAME;     } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 TsRangeExtension \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0435 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0411\u0414:<\/p>\n<pre><code class=\"php\">&lt;?php  namespace App\\TsRange\\Providers;  use Illuminate\\Support\\ServiceProvider; use App\\Extensions\\TsRange\\TsRangeExtension; use Umbrellio\\Postgres\\PostgresConnection;  class TsRangeExtensionProvider extends ServiceProvider {     public function register(): void     {         PostgresConnection::registerExtension(TsRangeExtension::class);     } }<\/code><\/pre>\n<h2>\u0418\u0442\u043e\u0433<\/h2>\n<p>\u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0434\u043b\u044f Postgres \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u044f AbstractExtension, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u043f\u0440\u043e\u0441\u0442\u043e, \u043d\u0435 \u0432\u043d\u0438\u043a\u0430\u044f \u0432 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u044b Laravel \u0438 Doctrine.<\/p>\n<p>\u042d\u0442\u043e \u043c\u043e\u0439 \u043f\u0435\u0440\u0432\u044b\u0439 \u043e\u043f\u044b\u0442, \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435 \u0434\u043b\u044f PHP \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430, \u0434\u043b\u044f \u0442\u0435\u0445 \u043a\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 Laravel \/ Postgres, \u043d\u0435 \u0441\u0443\u0434\u0438\u0442\u0435 \u0441\u0442\u0440\u043e\u0433\u043e, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/p>\n<p>\u041d\u043e \u044f \u0431\u0443\u0434\u0443 \u0440\u0430\u0434 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438, \u0432 \u043b\u044e\u0431\u043e\u043c \u0435\u0435 \u043f\u0440\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0438, \u0432 Issues \/ Pull-\u0440\u0435\u043a\u0432\u0435\u0441\u0442\u0430\u0445, \u0438\u043b\u0438 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0445 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u0435\u0439 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438, \u043d\u043e \u0438 \u043f\u0430\u043a\u0435\u0442\u0430 \u0432 \u0446\u0435\u043b\u043e\u043c \u043f\u0440\u0438\u043c\u0443 \u043b\u044e\u0431\u0443\u044e \u043a\u0440\u0438\u0442\u0438\u043a\u0443.<\/p>\n<p>\u041f\u043e\u0449\u0443\u043f\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442 \u043c\u043e\u0436\u043d\u043e \u043d\u0430 GitHub: <a href=\"https:\/\/github.com\/umbrellio\/laravel-pg-extensions\" rel=\"noopener noreferrer nofollow\">laravel-pg-extensions<\/a>.<\/p>\n<p>\u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.<\/p>\n<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/537426\/\"> https:\/\/habr.com\/ru\/post\/537426\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u0412\u0441\u0435, \u043a\u0442\u043e \u043e\u0434\u043d\u0430\u0436\u0434\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u043b \u0432\u0435\u0441\u0442\u0438 \u0431\u043e\u043b\u0435\u0435-\u043c\u0435\u043d\u0435\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0439 Enterprise \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 Laravel, \u0441\u0442\u0430\u043b\u043a\u0438\u0432\u0430\u043b\u0441\u044f \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 Laravel \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438, \u0443\u0436\u0435 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e.<\/p>\n<p>\u0410 \u0435\u0441\u043b\u0438 \u0432\u044b, \u043a\u0430\u043a \u0438 \u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0432 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 Postgres, \u0442\u043e \u0440\u0430\u043d\u043e \u0438\u043b\u0438 \u043f\u043e\u0437\u0434\u043d\u043e \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u043f\u043b\u044e\u0448\u043a\u0438 \u044d\u0442\u043e\u0439 \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0421\u0423\u0411\u0414, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a: \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0438 \u043a\u043e\u043d\u0441\u0442\u0440\u0435\u0439\u043d\u0442\u044b, \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f, \u043d\u043e\u0432\u044b\u0435 \u0442\u0438\u043f\u044b \u0438 \u0442\u0434&#8230;<\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f, \u043a\u0430\u043a \u0432\u044b \u0443\u0436\u0435 \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043f\u0440\u043e Postgres, \u043f\u0440\u043e \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 Laravel, \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u0441\u0435 \u0432\u043c\u0435\u0441\u0442\u0435 \u043f\u043e\u0434\u0440\u0443\u0436\u0438\u0442\u044c, \u0432 \u043e\u0431\u0449\u0435\u043c, \u043e\u0431\u043e \u0432\u0441\u0435\u043c \u0442\u043e\u043c, \u0447\u0435\u0433\u043e \u043d\u0430\u043c \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f\u0445 \u041b\u0430\u0440\u044b.<\/p>\n<p>\u041d\u0443 \u0430 \u0434\u043b\u044f \u0442\u0435\u0445, \u043a\u0442\u043e \u043d\u0435 \u0445\u043e\u0447\u0435\u0442 \u043f\u043e\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 Laravel, \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442, \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u044e\u0449\u0438\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 Laravel \u0438 Postgres \u043f\u043e \u044d\u0442\u043e\u0439 <a href=\"https:\/\/github.com\/umbrellio\/laravel-pg-extensions\" rel=\"noopener noreferrer nofollow\">\u0441\u0441\u044b\u043b\u043a\u0435<\/a> \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445. <\/p>\n<p>\u041d\u043e \u044f \u0432\u0441\u0435 \u0436\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043d\u0435 \u043f\u0440\u043e\u043b\u0438\u0441\u0442\u044b\u0432\u0430\u0442\u044c, \u0430 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432\u0441\u0435 \u0434\u043e \u043a\u043e\u043d\u0446\u0430.<\/p>\n<h2>\u041c\u0438\u0433\u0440\u0430\u0446\u0438\u0438<\/h2>\n<p>\u0412\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f \u0432 Laravel:<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  declare(strict_types=1);  use Illuminate\\Database\\Migrations\\Migration; use Illuminate\\Database\\Schema\\Blueprint; use Illuminate\\Support\\Facades\\Schema;  class CreateDocuments extends Migration {     private const TABLE = 'documents';      public function up()     {         Schema::create(static::TABLE, function (Blueprint $table) {             $table-&gt;bigIncrements('id');             $table-&gt;timestamps();             $table-&gt;softDeletes();             $table-&gt;string('number');             $table-&gt;date('issued_date')-&gt;nullable();             $table-&gt;date('expiry_date')-&gt;nullable();             $table-&gt;string('file');             $table-&gt;bigInteger('author_id');             $table-&gt;bigInteger('type_id');             $table-&gt;foreign('author_id')-&gt;references('id')-&gt;on('users');             $table-&gt;foreign('type_id')-&gt;references('id')-&gt;on('document_types');         });     }      public function down()     {         Schema::dropIfExists(static::TABLE);     } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041d\u043e, \u0442\u0443\u0442 \u0432\u044b \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b\u0438 \u0441\u0442\u0430\u0442\u044c\u044e \u043d\u0430 \u0445\u0430\u0431\u0440\u0435 \u043f\u0440\u043e \u043d\u043e\u0432\u044b\u0435 \u0442\u0438\u043f\u044b \u0432 Postgres, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <strong>tsrange<\/strong> \u0438 \u0437\u0430\u0445\u043e\u0442\u0435\u043b\u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044e \u0447\u0442\u043e-\u0442\u043e \u0432\u0440\u043e\u0434\u0435 \u044d\u0442\u043e\u0433\u043e&#8230;<\/p>\n<pre><code class=\"php\">$table-&gt;addColumn('tsrange', 'period')-&gt;nullable();<\/code><\/pre>\n<p>\u041a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u0431\u044b, \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e, \u043d\u043e \u0432\u0430\u0448 \u043f\u0435\u0440\u0444\u0435\u043a\u0446\u0438\u043e\u043d\u0438\u0437\u043c \u043d\u0430\u0432\u043e\u0434\u0438\u0442 \u0432\u0430\u0441 \u043d\u0430 \u043c\u044b\u0441\u043b\u044c, \u0430 \u043f\u043e\u0447\u0435\u043c\u0443 \u0431\u044b \u043d\u0435 \u0437\u0430\u043b\u0435\u0437\u0442\u044c \u0432 \u0441\u043e\u0440\u0446\u044b \u0438 \u043d\u0435 \u043f\u0440\u043e\u043f\u0430\u0442\u0447\u0438\u0442\u044c Laravel, \u0432\u0435\u0434\u044c \u044f \u0431\u0443\u0434\u0443 \u0447\u0430\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e, \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:<\/p>\n<pre><code>$table-&gt;tsRange('period')-&gt;nullable();<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0442\u0435\u0445, \u043a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0435\u043d\u0434\u043e\u0440\u043e\u0432\u0441\u043a\u0438\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u043f\u0430\u0442\u0447\u0438\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u044d\u0442\u043e\u0433\u043e, \u0437\u0430\u0433\u043b\u044f\u043d\u0438\u0442\u0435 \u043f\u043e\u0434 \u0441\u043f\u043e\u0439\u043b\u0435\u0440:<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u0430\u043a \u043f\u0440\u043e\u043f\u0430\u0442\u0447\u0438\u0442\u044c Laravel \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438<\/summary>\n<div class=\"spoiler__content\">\n<h4>\u041f\u0430\u0442\u0447\u0438\u043c Blueprint<\/h4>\n<pre><code class=\"php\">&lt;?php  Blueprint::macro('tsRange', function (string $columnName) {   return $this-&gt;addColumn('tsrange', $columnName); }); <\/code><\/pre>\n<h4>\u041f\u0430\u0442\u0447\u0438\u043c PostgresGrammar<\/h4>\n<pre><code class=\"php\">&lt;?php  PostgresGrammar::macro('typeTsrange', function () {   rerurn 'tsrange'; }); <\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440, \u0442\u0438\u043f\u0430 ExtendDatabaseProvider:<\/p>\n<pre><code class=\"php\">&lt;?php  use Illuminate\\Support\\ServiceProvider;  class DatabaseServiceProvider extends ServiceProvider {     public function register()     {         Blueprint::macro('tsRange', function (string $columnName) {             return $this-&gt;addColumn('tsrange', $columnName);         });          PostgresGrammar::macro('typeTsrange', function () {             return 'tsrange';         });     } }<\/code><\/pre>\n<p>\u0412\u0440\u043e\u0434\u0435 \u0431\u044b \u0432\u0441\u0435, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044e, \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442..<\/p>\n<\/div>\n<\/details>\n<p>\u0418 \u043d\u0435 \u0432\u0430\u0436\u043d\u043e, \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u043b\u0438 \u0432\u044b \u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u043e\u0432 Laravel \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0411\u0414 \u0438\u043b\u0438 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u043c\u0430\u043a\u0440\u043e\u0441\u0430\u043c\u0438 \u0438 \u043c\u0438\u043a\u0441\u0438\u043d\u0430\u043c\u0438 \u0438\u0437 MacroableTrait, \u043a\u0440\u0443\u0433\u0438 \u0430\u0434\u0430 \u0435\u0449\u0435 \u043d\u0435 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438\u0441\u044c.<\/p>\n<h3>\u041a\u0440\u0443\u0433\u0438 \u0430\u0434\u0430 (\u0447\u0430\u0441\u0442\u044c 1)<\/h3>\n<p>\u0418 \u0432\u043e\u0442 \u0432\u044b \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0432\u0441\u0435 \u044d\u0442\u043e \u043a\u0440\u0443\u0442\u0438\u0442\u0435, \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u0447\u0430\u0441\u044b, \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 +100500 \u0441\u0442\u0440\u043e\u043a \u043a\u043e\u0434\u0430, \u0438 \u0440\u0435\u0448\u0438\u043b\u0438 \u0432\u044b\u043a\u0430\u0442\u0438\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u0443\u044e \u0442\u0430\u0441\u043a\u0443 \u0432 \u0433\u0438\u0442\u043b\u0430\u0431. \u041c\u044b \u0436\u0435 \u0438\u0434\u0435\u043c \u0432 \u043d\u043e\u0433\u0443 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u0438 \u0442\u0430\u043c \u0443 \u043d\u0430\u0441 \u0414\u043e\u043a\u0435\u0440, CI, \u0442\u0435\u0441\u0442\u044b \u0438 \u0442\u0434&#8230;<\/p>\n<p>\u0418 \u0432\u043e\u0442 \u043c\u044b \u0437\u0430\u043c\u0435\u0447\u0430\u0435\u043c, \u0447\u0442\u043e \u043d\u0430\u0448\u0438 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0438 \u0432 &#171;\u043d\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u043c&#187; \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0438\u0437-\u0437\u0430 \u043e\u0448\u0438\u0431\u043a\u0438:<\/p>\n<pre><code>Doctrine\\DBAL\\Driver\\PDOException: SQLSTATE[08006] [7] FATAL:  sorry, too many clients already<\/code><\/pre>\n<p>\u0418 \u0432\u043e\u0442 \u0442\u044b \u0441\u0438\u0434\u0438\u0448\u044c \u0438 \u0434\u0443\u043c\u0430\u0435\u0448\u044c, \u0447\u0442\u043e \u0442\u044b \u043d\u0435 \u0442\u0430\u043a \u0434\u0435\u043b\u0430\u0435\u0448\u044c, \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0448\u044c \u043f\u043e\u0434\u043f\u0438\u0445\u0438\u0432\u0430\u0442\u044c \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0439 .env \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438\u0437 CI \u0432\u0430\u0448\u0435\u0433\u043e GitLab, \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u043a\u043e\u0434, \u0432\u043c\u0435\u0441\u0442\u043e \u043c\u0430\u043a\u0440\u043e\u0441\u043e\u0432 \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u043a\u043b\u0430\u0441\u0441\u044b, \u0440\u0430\u0441\u043f\u0438\u0445\u0438\u0432\u0430\u0442\u044c \u0432\u0435\u0437\u0434\u0435 \u0438 \u0432\u0441\u044e\u0434\u0443 \u0434\u0435\u0431\u0430\u0433\u0438, \u0432\u0441\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e, \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0435\u0442. \u0410 \u0432 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430\u0445 CI \u043d\u0435 \u0442\u0430\u043a-\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u0435\u0431\u0430\u0436\u0438\u0442\u044c, \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0448\u044c \u043f\u0438\u0445\u0430\u0442\u044c \u0432\u0435\u0437\u0434\u0435 \u0438 \u0432\u0441\u044e\u0434\u0443 \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0438 \u044d\u0442\u043e \u043d\u0435 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442, \u0432\u0435\u0434\u044c \u043e\u0448\u0438\u0431\u043a\u0430 \u0433\u0434\u0435-\u0442\u043e \u0432\u043d\u0443\u0442\u0440\u0438, \u0432 vendor. \u041d\u043e \u0442\u044b \u043e\u0431 \u044d\u0442\u043e\u043c \u0435\u0449\u0435 \u043f\u043e\u043a\u0430 \u043d\u0435 \u0437\u043d\u0430\u0435\u0448\u044c. <\/p>\n<p>\u0417\u0430\u0442\u0435\u043c, \u0441\u043f\u0443\u0441\u0442\u044f \u0446\u0435\u043b\u044b\u0439 \u0434\u043d\u044f \u0433\u0443\u0433\u043b\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0438, \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0442\u0430\u043a \u0438 \u043d\u0435\u0442, \u043a\u0443\u0447\u0430 \u0431\u0435\u0441\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u043e\u0432\u0435\u0442\u043e\u0432.<\/p>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u0435\u0448\u044c \u043e\u0449\u0443\u0449\u0430\u0442\u044c \u043f\u043e-\u0442\u0438\u0445\u043e\u043d\u044c\u043a\u0443 \u0441\u0435\u0431\u044f \u0438\u0434\u0438\u043e\u0442\u043e\u043c (\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u0435 \u0437\u0430 \u043c\u043e\u0439 \u0444\u0440\u0430\u043d\u0446\u0443\u0437\u0441\u043a\u0438\u0439), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u043d\u0438 \u043d\u0430 \u0447\u0442\u043e, \u0432 \u043f\u0440\u044f\u043c\u043e\u043c \u0441\u043c\u044b\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430, \u0441\u043b\u043e\u0432\u043d\u043e \u0442\u044b \u0448\u043a\u043e\u043b\u044c\u043d\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0442\u043e\u043b\u044c\u043a\u043e-\u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f \u0438\u0437 \u0448\u043a\u043e\u043b\u044b, \u0434\u0435\u043d\u044c \u0443\u0431\u0438\u0442, \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043d\u0435 \u0440\u0435\u0448\u0435\u043d\u0430.<\/p>\n<h3>\u0412\u0430\u0436\u0435\u043d \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442<\/h3>\n<p>\u041e\u0448\u0438\u0431\u043a\u0430 <strong>sorry, too many clients already<\/strong> \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043f\u043e \u043b\u044e\u0431\u043e\u0439 \u043f\u0440\u0438\u0447\u0438\u043d\u0435.<\/p>\n<p>\u0422\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0448\u044c\u0441\u044f \u043a \u043d\u0430\u0447\u0430\u043b\u0443, \u0433\u0443\u0433\u043b\u0438\u0448\u044c \u0442\u043e \u0441 \u0447\u0435\u0433\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u043b, \u0441 \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u043c\u0430\u043a\u0440\u043e\u0441\u0430\u043c\u0438 \u0432 PostgresGrammar \u043d\u043e\u0432\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0438 \u0432\u043e\u0442 \u0447\u0443\u0434\u043e, \u0442\u044b \u043d\u0430\u0442\u044b\u043a\u0430\u0435\u0448\u044c\u0441\u044f \u043d\u0430 \u043f\u043e\u0445\u043e\u0436\u0443\u044e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443, \u043d\u043e \u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0432\u0437\u0433\u043b\u044f\u0434\u0430 \u043e\u043d\u0430 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0430\u044f&#8230;. \u0433\u0434\u0435 \u043a\u0442\u043e-\u0442\u043e, \u043a\u0430\u043a \u0438 \u0442\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u043b \u043d\u043e\u0432\u044b\u0439 \u0442\u0438\u043f \u0438 \u0443 \u043d\u0435\u0433\u043e \u043d\u0435 \u0437\u0430\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0411\u0414. \u041d\u043e \u0443 \u043d\u0435\u0433\u043e \u043e\u0448\u0438\u0431\u043a\u0430 \u0434\u0440\u0443\u0433\u0430\u044f:<\/p>\n<pre><code>Doctrine\\DBAL\\DBALException: Unknown database type tsrange requested, Doctrine\\DBAL\\Platforms\\PostgreSQL100Platform may not support it.<\/code><\/pre>\n<p>\u041e\u0442\u0447\u0430\u044f\u0432\u0448\u0438\u0441\u044c, \u043f\u0435\u0440\u0432\u0430\u044f \u043c\u044b\u0441\u043b\u044c, \u0430 \u0447\u0435\u043c \u0447\u0435\u0440\u0442 \u043d\u0435 \u0448\u0443\u0442\u0438\u0442&#8230; \u0442\u044b \u043f\u0440\u043e\u0431\u0443\u0435\u0448\u044c \u0447\u0443\u0436\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u0434\u0430\u0436\u0435 \u0441\u0430\u043c\u044b\u0435 \u0430\u0431\u0441\u0443\u0440\u0434\u043d\u044b\u0435 \u0438 \u0432 \u043e\u0434\u0438\u043d \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u044b\u0439 \u0434\u0435\u043d\u044c \u0432\u0441\u0435 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c. \u0412\u044b \u0443\u0436\u0435 \u0434\u043e\u0433\u0430\u0434\u0430\u043b\u0438\u0441\u044c \u0432 \u0447\u0435\u043c \u0434\u0435\u043b\u043e?<\/p>\n<h3>\u0411\u0430\u0440\u0430\u0431\u0430\u043d\u043d\u0430\u044f \u0434\u0440\u043e\u0431\u044c<\/h3>\n<blockquote>\n<p>Any Doctrine type that you use has to be registered with \\Doctrine\\DBAL\\Types\\Type::addType().<\/p>\n<\/p>\n<p>You can get a list of all the known types with  \\Doctrine\\DBAL\\Types\\Type::getTypesMap().<\/p>\n<\/p>\n<p>If this error occurs during database introspection then you might  have forgotten to register all database types for a Doctrine Type. <\/p>\n<\/p>\n<p>Use AbstractPlatform#registerDoctrineTypeMapping() or have your  custom types implement Type#getMappedDatabaseTypes(). <\/p>\n<\/p>\n<p>If the type name is empty you might have a problem with the cache or forgot some mapping information.<\/p>\n<\/blockquote>\n<p>\u0418\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u043f\u0435\u0442\u044c \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0438\u043f \u0432 Doctrine\\Dbal \u043f\u0440\u0435\u0436\u0434\u0435, \u0447\u0435\u043c \u0434\u043e \u0432\u0430\u0448\u0435\u0433\u043e Database Connection \u0434\u043e\u0439\u0434\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u0447\u0442\u043e \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u0442\u0438\u043f\u044b (\u043f\u043e\u0434 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u043c\u0438 \u044f \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u044e \u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0441\u0442\u044c \u0432 Postgres, \u043d\u043e \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0432 \u0437\u0430\u0432\u0435\u0442\u043d\u043e\u043c getTypesMap \u0432 \u043d\u0435\u0434\u0440\u0430\u0445 Doctrine.<\/p>\n<h2>\u041a\u0440\u0443\u0433\u0438 \u0430\u0434\u0430 (\u0447\u0430\u0441\u0442\u044c 2)<\/h2>\n<p>\u0412\u044b \u043b\u0435\u0437\u0435\u0442\u0435 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438, \u043a\u0443\u0434\u0430-\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u0433\u043b\u0443\u0431\u043e\u043a\u043e \u0432 vendor \u0432 \u043d\u0435\u0434\u0440\u044b doctrine\\dbal&#8230;<\/p>\n<p>\u0421\u043f\u0443\u0441\u0442\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043a\u043e\u043b-\u0432\u043e \u0432\u043f\u0443\u0441\u0442\u0443\u044e \u043f\u043e\u0442\u0440\u0430\u0447\u0435\u043d\u043d\u044b\u0445 \u0447\u0430\u0441\u043e\u0432, \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u0442\u0435, \u0447\u0442\u043e \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0438\u043f \u0432 Doctrine, \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0441 \u0434\u0435\u0441\u044f\u0442\u043e\u043a \u043a\u043b\u0430\u0441\u0441\u043e\u0432 \u0438, \u043f\u043e\u043c\u0438\u043c\u043e \u043f\u0440\u043e\u0447\u0435\u0433\u043e, \u0435\u0449\u0435 \u0438 \u0441 \u0434\u0435\u0441\u044f\u0442\u043e\u043a \u043c\u0435\u0442\u043e\u0434\u043e\u0432.<\/p>\n<p><strong>\u041e \u0431\u043e\u0436\u0435, \u0447\u0430\u0441\u0442\u044c \u0438\u0437 \u043d\u0438\u0445 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0435!<\/strong><\/p>\n<p>\u0412\u0441\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043c\u043e\u0433\u0443, \u044d\u0442\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 \u043c\u044b\u0441\u043b\u0438 \u0438 \u0441\u043b\u043e\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u0445\u043e\u0434\u044f\u0442 \u0438\u0437 \u0432\u0430\u0448\u0438\u0445 \u0443\u0441\u0442..<\/p>\n<p>\u0420\u0443\u043a\u0438 \u043e\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e..<\/p>\n<h2>\u0421\u043f\u0430\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043a\u0440\u0443\u0433<\/h2>\n<p>\u041d\u0435 \u0431\u0443\u0434\u0443 \u0445\u043e\u0434\u0438\u0442\u044c \u0432\u043e\u043a\u0440\u0443\u0433, \u0434\u0430 \u043e\u043a\u043e\u043b\u043e. <\/p>\n<p>\u042d\u0442\u043e, \u043a\u0430\u043a \u0432\u044b \u0443\u0436\u0435 \u043f\u043e\u043d\u044f\u043b\u0438, \u0431\u044b\u043b \u043c\u043e\u0439 \u043b\u0438\u0447\u043d\u044b\u0439 \u043e\u043f\u044b\u0442, \u043c\u043e\u0438 \u0440\u0443\u043a\u0438 \u043d\u0435 \u043e\u043f\u0443\u0441\u0442\u0438\u043b\u0438\u0441\u044c, \u0432\u0441\u0435-\u0442\u0430\u043a\u0438 \u044f \u043f\u043e\u0431\u0435\u0434\u0438\u043b \u044d\u0442\u043e\u0442 \u0432\u0435\u043b\u0438\u043a\u0438\u0439 \u0438 \u0443\u0436\u0430\u0441\u043d\u044b\u0439 Doctrine.<\/p>\n<h2>\u041f\u043e\u0434\u0443\u043c\u0430\u0435\u043c \u043e \u0431\u0443\u0434\u0443\u0449\u0435\u043c<\/h2>\n<p>\u0410 \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u044f \u043d\u0435 \u043f\u0435\u0440\u0432\u044b\u0439, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u043d\u0435 \u043c\u043d\u0435 \u043e\u0434\u043d\u043e\u043c\u0443 \u043d\u0430\u0434\u043e \u044d\u0442\u043e, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u043f\u0430\u043a\u0435\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u043b \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0448\u0438\u0445 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u0439 \u043b\u044e\u0431\u043e\u043c\u0443, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u0442\u0438\u043f\u044b, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u043e\u0441\u0442\u043e, \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e, \u0438 \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u043b\u0435\u0437\u0442\u044c \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 Laravel \u0438 Doctrine, \u0438 \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043f\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443 \u0430\u0432\u0442\u043e\u0431\u043e\u0442\u043e\u0432. <\/p>\n<p>\u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u043a\u0430\u043a \u041e\u043f\u0442\u0438\u043c\u0443\u0441 \u041f\u0440\u0430\u0439\u043c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0442\u0440\u0435\u0439\u043b\u0435\u0440\u0430 \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0430\u043b \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043b\u0435\u0442\u0430\u0442\u044c, \u0430 \u0434\u0440\u0443\u0433\u0438\u0435 \u0430\u0432\u0442\u043e\u0431\u043e\u0442\u044b, \u0431\u044b\u043b\u0438 \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0441\u0432\u043e\u0435\u0433\u043e \u0440\u043e\u0434\u0430 \u0434\u043e\u043f. \u043e\u0440\u0443\u0434\u0438\u044f\u043c\u0438.<\/p>\n<p>\u041f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0441\u0435\u0431\u0435 \u0442\u0430\u043a\u043e\u0439 DatabaseProvider, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0432\u043d\u0435\u0434\u0440\u044f\u0435\u043c \u0432 \u0441\u0432\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043e\u0442 Laravel, \u043e\u043f\u0438\u0448\u0435\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0431\u0443\u0434\u0443\u0449\u0438\u0445 Extension-\u043e\u0432 \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0441 \u043f\u043e\u0445\u043e\u0436\u0435\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u043b\u0435\u0433\u043a\u043e \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u0438\u043b\u0438\u0441\u044c \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u0443, \u0438 \u0437\u0430\u0431\u044b\u0442\u044c, \u043a\u0430\u043a \u0441\u0442\u0440\u0430\u0448\u043d\u044b\u0439 \u0441\u043e\u043d \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 Doctrine.<\/p>\n<h2>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b<\/h2>\n<p>\u042d\u0442\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u043d\u0430\u043c \u043d\u0430\u0434\u043e \u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0432 \u0441\u0442\u0438\u043b\u0435 \u041e\u041e\u041f, \u0441\u0431\u043e\u043a\u0443, \u043f\u043e \u0442\u0438\u043f\u0443 \u043a\u0430\u043a \u0442\u0440\u0435\u0439\u0442\u044b \u0438\u043d\u044c\u0435\u043a\u0442\u044f\u0442\u0441\u044f \u0432 \u043a\u043b\u0430\u0441\u0441\u044b:<\/p>\n<ul>\n<li>\n<p><strong>Blueprint<\/strong> &#8212; \u043e\u0431\u044a\u0435\u043a\u0442, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0439\u0441\u044f \u0432 \u043c\u0438\u0433\u0440\u0430\u0446\u0438\u044f\u0445, \u043f\u043e \u0441\u0443\u0442\u0438 \u0431\u0438\u043b\u0434\u0435\u0440<\/p>\n<\/li>\n<li>\n<p><strong>Builder<\/strong> &#8212; \u043e\u043d \u0436\u0435 \u0444\u0430\u0441\u0430\u0434 Schema<\/p>\n<\/li>\n<li>\n<p><strong>PostgresGrammar<\/strong> &#8212; \u043e\u0431\u044a\u0435\u043a\u0442 \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 Blueprint-\u0430 \u0432 SQL-\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p><strong>Types<\/strong> &#8212; \u043d\u0430\u0448\u0438 \u0442\u0438\u043f\u044b<\/p>\n<\/li>\n<\/ul>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435, \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0435\u043c \u043e\u0431\u044a\u0435\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0434\u043c\u0435\u0448\u0438\u0432\u0430\u0442\u044c \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439 \u0432\u043e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b Laravel \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0438 \u043e\u0432\u0446\u044b \u0431\u044b\u043b\u0438 \u0446\u0435\u043b\u044b \u0438 \u0432\u043e\u043b\u043a\u0438 \u0441\u044b\u0442\u044b, \u0438\u043c\u0435\u044e \u0432\u0432\u0438\u0434\u0443, \u0447\u0442\u043e\u0431\u044b IDE \u0431\u044b\u043b \u0441\u0447\u0430\u0441\u0442\u043b\u0438\u0432, \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u0430 \u043d\u0430\u0448 \u043a\u043e\u0434 \u0431\u044b\u043b \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043b\u0430\u0441\u0441\u0430, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u0442\u0430\u043a\u043e\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  namespace Umbrellio\\Postgres\\Extensions;  use Illuminate\\Support\\Traits\\Macroable; use Umbrellio\\Postgres\\Extensions\\Exceptions\\MacroableMissedException; use Umbrellio\\Postgres\\Extensions\\Exceptions\\MixinInvalidException;  abstract class AbstractExtension extends AbstractComponent {     abstract public static function getMixins(): array;      abstract public static function getName(): string;      public static function getTypes(): array     {         return [];     }      final public static function register(): void     {         collect(static::getMixins())-&gt;each(static function ($extension, $mixin) {             if (!is_subclass_of($mixin, AbstractComponent::class)) {                 throw new MixinInvalidException(sprintf(                     'Mixed class %s is not descendant of %s.',                     $mixin,                     AbstractComponent::class                 ));             }             if (!method_exists($extension, 'mixin')) {                 throw new MacroableMissedException(sprintf('Class %s doesn\u2019t use Macroable Trait.', $extension));             }             \/** @var Macroable $extension *\/             $extension::mixin(new $mixin());         });     } }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c, \u043f\u0440\u043e\u043f\u0430\u0442\u0447\u0438\u043c \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u043e \u0443\u043c\u0435\u043b\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u044d\u0442\u0438\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c \u0438 \u0440\u0435\u0448\u0430\u043b\u043e \u0432\u0441\u0435 \u043d\u0430\u0448\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u043e \u0432 \u043d\u0443\u0436\u043d\u044b\u0435 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b Laravel \u043d\u0430\u0448\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0440\u0435\u0448\u0430\u043b\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0441 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0435\u0439 \u0442\u0438\u043f\u043e\u0432 \u0432 Doctrine.<\/p>\n<details class=\"spoiler\">\n<summary>\u041f\u0430\u0442\u0447\u0438\u043c PostgresConnection<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"php\">&lt;?php  namespace Umbrellio\\Postgres;  use DateTimeInterface; use Doctrine\\DBAL\\Connection; use Doctrine\\DBAL\\Events; use Illuminate\\Database\\PostgresConnection as BasePostgresConnection; use Illuminate\\Support\\Traits\\Macroable; use PDO; use Umbrellio\\Postgres\\Extensions\\AbstractExtension; use Umbrellio\\Postgres\\Extensions\\Exceptions\\ExtensionInvalidException; use Umbrellio\\Postgres\\Schema\\Builder; use Umbrellio\\Postgres\\Schema\\Grammars\\PostgresGrammar; use<\/code><\/pre>\n<\/div>\n<\/details>\n<p><\/br><\/p>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-316397","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/316397","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=316397"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/316397\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=316397"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=316397"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=316397"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}