Skip to content

Commit

Permalink
tests: add comments relationship to book
Browse files Browse the repository at this point in the history
  • Loading branch information
hrach committed Dec 20, 2024
1 parent e26db5f commit 240241b
Show file tree
Hide file tree
Showing 54 changed files with 524 additions and 503 deletions.
3 changes: 2 additions & 1 deletion src/Model/SimpleModelFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ class SimpleModelFactory
{
/**
* @template E of IEntity
* @param array<string, IRepository<E>> $repositories
* @param array<string, IRepository<E>> $repositories Map of a repository name and its instance. The name is used
* for accessing repository by name in contrast to accessing by class-string.
*/
public function __construct(
private readonly Cache $cache,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ nextras.orm:
repositoryFinder: Nextras\Orm\Bridges\NetteDI\DIRepositoryFinder

services:
- NextrasTests\Orm\ContentsRepository(NextrasTests\Orm\ContentsMapper())
- NextrasTests\Orm\TimeSeriesRepository(NextrasTests\Orm\ContentsMapper())
- Nette\Caching\Cache
2 changes: 1 addition & 1 deletion tests/cases/integration/BridgeNetteDI/dic-finder.neon
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ nextras.orm:
repositoryFinder: Nextras\Orm\Bridges\NetteDI\DIRepositoryFinder

services:
- NextrasTests\Orm\ContentsRepository(Nextras\Orm\TestHelper\TestMapper())
- NextrasTests\Orm\TimeSeriesRepository(Nextras\Orm\TestHelper\TestMapper())
14 changes: 8 additions & 6 deletions tests/cases/integration/BridgeNetteDI/dic-finder.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use Nette\DI\Container;
use Nette\DI\ContainerLoader;
use Nette\DI\Extensions\ExtensionsExtension;
use Nextras\Orm\Model\IModel;
use NextrasTests\Orm\ContentsRepository;
use NextrasTests\Orm\Thread;
use NextrasTests\Orm\TimeSeries;
use NextrasTests\Orm\TimeSeriesRepository;
use Tester\Assert;


Expand All @@ -34,9 +34,11 @@ function buildDic(string $config): Container
$container = buildDic(__DIR__ . '/dic-finder.neon');
$model = $container->getByType(IModel::class);

$thread = new Thread();
$timeSeries = new TimeSeries();
$timeSeries->date = 'now';
$timeSeries->value = 1;

$contentsRepository = $model->getRepository(ContentsRepository::class);
$contentsRepository->persistAndFlush($thread);
$timeSeriesRepository = $model->getRepository(TimeSeriesRepository::class);
$timeSeriesRepository->persistAndFlush($timeSeries);

Assert::same(1, $contentsRepository->findAll()->countStored());
Assert::same(1, $timeSeriesRepository->findAll()->countStored());
3 changes: 3 additions & 0 deletions tests/cases/integration/Mapper/file.general.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use NextrasTests\Orm\Author;
use NextrasTests\Orm\AuthorsRepository;
use NextrasTests\Orm\Book;
use NextrasTests\Orm\BooksRepository;
use NextrasTests\Orm\ContentsRepository;
use NextrasTests\Orm\EansRepository;
use NextrasTests\Orm\Model;
use NextrasTests\Orm\Publisher;
Expand Down Expand Up @@ -125,6 +126,8 @@ class FileMapperTest extends TestCase
'tagFollowers' => new TagFollowersRepository(new TestFileMapper($fileName('tags'))),
// @phpstan-ignore-next-line
'eans' => new EansRepository(new TestFileMapper($fileName('eans'))),
// @phpstan-ignore-next-line
'contents' => new ContentsRepository(new TestFileMapper($fileName('contents'))),
]
);
return $factory->create();
Expand Down
28 changes: 16 additions & 12 deletions tests/db/mssql-init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ CREATE TABLE tags
PRIMARY KEY (id)
);


CREATE TABLE eans
(
id int NOT NULL IDENTITY (1,1),
Expand All @@ -34,6 +35,18 @@ CREATE TABLE eans
PRIMARY KEY (id)
);


CREATE TABLE contents
(
id int NOT NULL,
type varchar(10) NOT NULL,
thread_id int,
replied_at datetimeoffset,
PRIMARY KEY (id),
CONSTRAINT contents_thread_id FOREIGN KEY (thread_id) REFERENCES contents (id) ON DELETE NO ACTION ON UPDATE NO ACTIOn
);


CREATE TABLE books
(
id int NOT NULL IDENTITY (1,1),
Expand All @@ -50,12 +63,14 @@ CREATE TABLE books
price_currency char(3),
orig_price_cents int,
orig_price_currency char(3),
thread_id int,
PRIMARY KEY (id),
CONSTRAINT books_authors FOREIGN KEY (author_id) REFERENCES authors (id),
CONSTRAINT books_translator FOREIGN KEY (translator_id) REFERENCES authors (id),
CONSTRAINT books_next_part FOREIGN KEY (next_part) REFERENCES books (id),
CONSTRAINT books_publisher FOREIGN KEY (publisher_id) REFERENCES publishers (publisher_id),
CONSTRAINT books_ena FOREIGN KEY (ean_id) REFERENCES eans (id)
CONSTRAINT books_ean FOREIGN KEY (ean_id) REFERENCES eans (id),
CONSTRAINT books_comments FOREIGN KEY (thread_id) REFERENCES contents (id)
);

CREATE INDEX book_title ON books (title);
Expand All @@ -82,17 +97,6 @@ CREATE TABLE tag_followers
);


CREATE TABLE contents
(
id int NOT NULL,
type varchar(10) NOT NULL,
thread_id int,
replied_at datetimeoffset,
PRIMARY KEY (id),
CONSTRAINT contents_thread_id FOREIGN KEY (thread_id) REFERENCES contents (id) ON DELETE NO ACTION ON UPDATE NO ACTIOn
);


CREATE TABLE book_collections
(
id int NOT NULL,
Expand Down
28 changes: 16 additions & 12 deletions tests/db/mysql-init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ CREATE TABLE tags
PRIMARY KEY (id)
) AUTO_INCREMENT = 4;


CREATE TABLE eans
(
id int NOT NULL AUTO_INCREMENT,
Expand All @@ -34,6 +35,18 @@ CREATE TABLE eans
PRIMARY KEY (id)
) AUTO_INCREMENT = 1;


CREATE TABLE contents
(
id int NOT NULL AUTO_INCREMENT,
type varchar(10) NOT NULL,
thread_id int,
replied_at timestamp,
PRIMARY KEY (id),
CONSTRAINT contents_parent_id FOREIGN KEY (thread_id) REFERENCES contents (id) ON DELETE CASCADE ON UPDATE CASCADE
);


CREATE TABLE books
(
id int NOT NULL AUTO_INCREMENT,
Expand All @@ -50,12 +63,14 @@ CREATE TABLE books
price_currency char(3),
orig_price_cents int,
orig_price_currency char(3),
thread_id int,
PRIMARY KEY (id),
CONSTRAINT books_authors FOREIGN KEY (author_id) REFERENCES authors (id),
CONSTRAINT books_translator FOREIGN KEY (translator_id) REFERENCES authors (id),
CONSTRAINT books_next_part FOREIGN KEY (next_part) REFERENCES books (id),
CONSTRAINT books_publisher FOREIGN KEY (publisher_id) REFERENCES publishers (publisher_id),
CONSTRAINT books_ena FOREIGN KEY (ean_id) REFERENCES eans (id)
CONSTRAINT books_ean FOREIGN KEY (ean_id) REFERENCES eans (id),
CONSTRAINT books_comments FOREIGN KEY (thread_id) REFERENCES contents (id)
) AUTO_INCREMENT = 4;

CREATE INDEX book_title ON books (title);
Expand All @@ -82,17 +97,6 @@ CREATE TABLE tag_followers
);


CREATE TABLE contents
(
id int NOT NULL AUTO_INCREMENT,
type varchar(10) NOT NULL,
thread_id int,
replied_at timestamp,
PRIMARY KEY (id),
CONSTRAINT contents_parent_id FOREIGN KEY (thread_id) REFERENCES contents (id) ON DELETE CASCADE ON UPDATE CASCADE
);


CREATE TABLE book_collections
(
id int UNSIGNED NOT NULL,
Expand Down
28 changes: 16 additions & 12 deletions tests/db/pgsql-init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ CREATE TABLE "tags"
PRIMARY KEY ("id")
);


CREATE TABLE "eans"
(
"id" SERIAL4 NOT NULL,
Expand All @@ -34,6 +35,18 @@ CREATE TABLE "eans"
PRIMARY KEY ("id")
);


CREATE TABLE "contents"
(
"id" SERIAL4 NOT NULL,
"type" varchar(10) NOT NULL,
"thread_id" int,
"replied_at" timestamptz,
PRIMARY KEY ("id"),
CONSTRAINT "contents_thread_id" FOREIGN KEY ("thread_id") REFERENCES "contents" ("id") ON DELETE CASCADE ON UPDATE CASCADE
);


CREATE TABLE "books"
(
"id" SERIAL4 NOT NULL,
Expand All @@ -50,12 +63,14 @@ CREATE TABLE "books"
"price_currency" char(3),
"orig_price_cents" int,
"orig_price_currency" char(3),
"thread_id" int,
PRIMARY KEY ("id"),
CONSTRAINT "books_authors" FOREIGN KEY ("author_id") REFERENCES authors ("id"),
CONSTRAINT "books_translator" FOREIGN KEY ("translator_id") REFERENCES authors ("id"),
CONSTRAINT "books_next_part" FOREIGN KEY ("next_part") REFERENCES books ("id"),
CONSTRAINT "books_publisher" FOREIGN KEY ("publisher_id") REFERENCES publishers ("publisher_id"),
CONSTRAINT "books_ean" FOREIGN KEY ("ean_id") REFERENCES eans ("id")
CONSTRAINT "books_ean" FOREIGN KEY ("ean_id") REFERENCES eans ("id"),
CONSTRAINT "books_comments" FOREIGN KEY ("thread_id") REFERENCES contents ("id")
);

CREATE INDEX "book_title" ON "books" ("title");
Expand All @@ -82,17 +97,6 @@ CREATE TABLE "tag_followers"
);


CREATE TABLE "contents"
(
"id" SERIAL4 NOT NULL,
"type" varchar(10) NOT NULL,
"thread_id" int,
"replied_at" timestamptz,
PRIMARY KEY ("id"),
CONSTRAINT "contents_thread_id" FOREIGN KEY ("thread_id") REFERENCES "contents" ("id") ON DELETE CASCADE ON UPDATE CASCADE
);


CREATE TABLE "book_collections"
(
"id" int4 NOT NULL,
Expand Down
1 change: 1 addition & 0 deletions tests/inc/model/book/Book.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* @property DateTimeImmutable|null $printedAt
* @property Money|null $price {embeddable}
* @property Money|null $origPrice {embeddable}
* @property Thread|null $thread {1:1 Thread::$book, isMain=true}
*/
final class Book extends Entity
{
Expand Down
1 change: 1 addition & 0 deletions tests/inc/model/contents/Thread.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/**
* @property-read string $type {default thread}
* @property OneHasMany<Comment> $comments {1:m Comment::$thread, cascade=[persist, remove]}
* @property Book|null $book {1:1 Book::$thread}
*/
class Thread extends ThreadCommentCommon
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ SELECT "authors".* FROM "public"."authors" AS "authors" WHERE "authors"."id" = 1
SELECT "authors".* FROM "public"."authors" AS "authors" WHERE "authors"."id" = 2;
SELECT "publishers".* FROM "publishers" AS "publishers" WHERE "publishers"."publisher_id" = 1;
START TRANSACTION;
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "genre", "published_at", "printed_at", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('Books 5', 1, 2, NULL, NULL, 1, 'fantasy', '2021-12-31 23:59:59.000000'::timestamp, NULL, NULL, NULL, NULL, NULL);
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "genre", "published_at", "printed_at", "thread_id", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('Books 5', 1, 2, NULL, NULL, 1, 'fantasy', '2021-12-31 23:59:59.000000'::timestamp, NULL, NULL, NULL, NULL, NULL, NULL);
SELECT CURRVAL('public.books_id_seq');
COMMIT;
SELECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SELECT "books".* FROM "books" AS "books" WHERE "books"."id" = 4;
START TRANSACTION;
INSERT INTO "eans" ("code", "type") VALUES ('456', 2);
SELECT CURRVAL('public.eans_id_seq');
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "genre", "published_at", "printed_at", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('Book 5', 1, NULL, 4, 2, 1, 'fantasy', '2021-12-31 23:59:59.000000'::timestamp, NULL, NULL, NULL, NULL, NULL);
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "genre", "published_at", "printed_at", "thread_id", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('Book 5', 1, NULL, 4, 2, 1, 'fantasy', '2021-12-31 23:59:59.000000'::timestamp, NULL, NULL, NULL, NULL, NULL, NULL);
SELECT CURRVAL('public.books_id_seq');
COMMIT;
SELECT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ INSERT INTO "public"."authors" ("name", "born", "web", "favorite_author_id") VAL
SELECT CURRVAL('public.authors_id_seq');
INSERT INTO "publishers" ("name") VALUES ('Publisher');
SELECT CURRVAL('public.publishers_publisher_id_seq');
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "genre", "published_at", "printed_at", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('New Book', 3, NULL, NULL, NULL, 4, 'fantasy', '2021-12-31 23:59:59.000000'::timestamp, NULL, NULL, NULL, NULL, NULL);
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "genre", "published_at", "printed_at", "thread_id", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('New Book', 3, NULL, NULL, NULL, 4, 'fantasy', '2021-12-31 23:59:59.000000'::timestamp, NULL, NULL, NULL, NULL, NULL, NULL);
SELECT CURRVAL('public.books_id_seq');
INSERT INTO "tags" ("name", "is_global") VALUES ('Tag 1', 'y');
SELECT CURRVAL('public.tags_id_seq');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ SELECT "tags".* FROM "tags" AS "tags" WHERE "tags"."id" IN (1, 2);
SELECT "books".* FROM "books" AS "books" WHERE "books"."next_part" IN (1);
SELECT "publishers".* FROM "publishers" AS "publishers" WHERE "publishers"."publisher_id" IN (1);
START TRANSACTION;
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "genre", "published_at", "printed_at", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('Book 1', 1, 1, NULL, NULL, 1, 'sciFi', '2021-12-14 21:10:04.000000'::timestamp, NULL, 50, 'CZK', NULL, NULL);
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "genre", "published_at", "printed_at", "thread_id", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('Book 1', 1, 1, NULL, NULL, 1, 'sciFi', '2021-12-14 21:10:04.000000'::timestamp, NULL, NULL, 50, 'CZK', NULL, NULL);
SELECT CURRVAL('public.books_id_seq');
INSERT INTO "books_x_tags" ("book_id", "tag_id") VALUES (5, 1), (5, 2);
COMMIT;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ INSERT INTO "public"."authors" ("name", "born", "web", "favorite_author_id") VAL
SELECT CURRVAL('public.authors_id_seq');
INSERT INTO "publishers" ("name") VALUES ('Nextras publisher A');
SELECT CURRVAL('public.publishers_publisher_id_seq');
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "genre", "published_at", "printed_at", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('Book 6', 3, NULL, NULL, NULL, 4, 'fantasy', '2021-12-14 21:10:02.000000'::timestamp, NULL, 150, 'CZK', NULL, NULL);
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "genre", "published_at", "printed_at", "thread_id", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('Book 6', 3, NULL, NULL, NULL, 4, 'fantasy', '2021-12-14 21:10:02.000000'::timestamp, NULL, NULL, 150, 'CZK', NULL, NULL);
SELECT CURRVAL('public.books_id_seq');
COMMIT;
SELECT "books".* FROM "books" AS "books" WHERE "books"."title" = 'Book 6';
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ INSERT INTO "public"."authors" ("name", "born", "web", "favorite_author_id") VAL
SELECT CURRVAL('public.authors_id_seq');
INSERT INTO "publishers" ("name") VALUES ('Nextras publisher A');
SELECT CURRVAL('public.publishers_publisher_id_seq');
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "genre", "published_at", "printed_at", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('Book 5', 3, NULL, NULL, NULL, 4, 'fantasy', '2021-12-14 21:10:02.000000'::timestamp, NULL, 150, 'CZK', NULL, NULL);
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "genre", "published_at", "printed_at", "thread_id", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('Book 5', 3, NULL, NULL, NULL, 4, 'fantasy', '2021-12-14 21:10:02.000000'::timestamp, NULL, NULL, 150, 'CZK', NULL, NULL);
SELECT CURRVAL('public.books_id_seq');
UPDATE "books" SET "genre" = 'romance' WHERE "id" = 5;
COMMIT;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ INSERT INTO "public"."authors" ("name", "born", "web", "favorite_author_id") VAL
SELECT CURRVAL('public.authors_id_seq');
INSERT INTO "publishers" ("name") VALUES ('Nextras publisher A');
SELECT CURRVAL('public.publishers_publisher_id_seq');
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "genre", "published_at", "printed_at", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('Book 7', 3, NULL, NULL, NULL, 4, 'fantasy', '2021-12-14 21:10:02.000000'::timestamp, NULL, 150, 'CZK', NULL, NULL);
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "genre", "published_at", "printed_at", "thread_id", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('Book 7', 3, NULL, NULL, NULL, 4, 'fantasy', '2021-12-14 21:10:02.000000'::timestamp, NULL, NULL, 150, 'CZK', NULL, NULL);
SELECT CURRVAL('public.books_id_seq');
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ INSERT INTO "public"."authors" ("name", "born", "web", "favorite_author_id") VAL
SELECT CURRVAL('public.authors_id_seq');
INSERT INTO "publishers" ("name") VALUES ('P');
SELECT CURRVAL('public.publishers_publisher_id_seq');
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "genre", "published_at", "printed_at", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('B', 3, NULL, NULL, NULL, 4, 'fantasy', '2015-09-09 10:10:10.000000'::timestamp, NULL, NULL, NULL, NULL, NULL);
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "genre", "published_at", "printed_at", "thread_id", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('B', 3, NULL, NULL, NULL, 4, 'fantasy', '2015-09-09 10:10:10.000000'::timestamp, NULL, NULL, NULL, NULL, NULL, NULL);
SELECT CURRVAL('public.books_id_seq');
COMMIT;
SELECT "books".* FROM "books" AS "books" WHERE "books"."id" = 5;
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ INSERT INTO "public"."authors" ("name", "born", "web", "favorite_author_id") VAL
SELECT CURRVAL('public.authors_id_seq');
INSERT INTO "publishers" ("name") VALUES ('7K');
SELECT CURRVAL('public.publishers_publisher_id_seq');
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "genre", "published_at", "printed_at", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('A new book', 3, NULL, NULL, NULL, 4, 'fantasy', '2021-12-31 23:59:59.000000'::timestamp, NULL, NULL, NULL, NULL, NULL);
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "genre", "published_at", "printed_at", "thread_id", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('A new book', 3, NULL, NULL, NULL, 4, 'fantasy', '2021-12-31 23:59:59.000000'::timestamp, NULL, NULL, NULL, NULL, NULL, NULL);
SELECT CURRVAL('public.books_id_seq');
INSERT INTO "tags" ("name", "is_global") VALUES ('Awesome', 'y');
SELECT CURRVAL('public.tags_id_seq');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ INSERT INTO "public"."authors" ("name", "born", "web", "favorite_author_id") VAL
SELECT CURRVAL('public.authors_id_seq');
INSERT INTO "publishers" ("name") VALUES ('Jupiter Mining Corporation');
SELECT CURRVAL('public.publishers_publisher_id_seq');
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "genre", "published_at", "printed_at", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('Better Than Life', 4, 3, NULL, NULL, 4, 'fantasy', '2021-12-31 23:59:59.000000'::timestamp, NULL, NULL, NULL, NULL, NULL);
INSERT INTO "books" ("title", "author_id", "translator_id", "next_part", "ean_id", "publisher_id", "genre", "published_at", "printed_at", "thread_id", "price", "price_currency", "orig_price_cents", "orig_price_currency") VALUES ('Better Than Life', 4, 3, NULL, NULL, 4, 'fantasy', '2021-12-31 23:59:59.000000'::timestamp, NULL, NULL, NULL, NULL, NULL, NULL);
SELECT CURRVAL('public.books_id_seq');
Loading

0 comments on commit 240241b

Please sign in to comment.