Skip to content

Instantly share code, notes, and snippets.

@theodesp
Created December 7, 2019 15:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theodesp/d3245b840a9c555972b17eab9e3c70ef to your computer and use it in GitHub Desktop.
Save theodesp/d3245b840a9c555972b17eab9e3c70ef to your computer and use it in GitHub Desktop.
create table product
(
id INTEGER not null
primary key,
price INTEGER not null
);
create table product_translation
(
id INTEGER not null
primary key
autoincrement,
translatable_id INTEGER default NULL,
name VARCHAR(255) not null,
description VARCHAR(255) not null,
locale VARCHAR(255) not null
);
create index IDX_1846DB702C2AC5D3
on product_translation (translatable_id);
create unique index product_translation_unique_translation
on product_translation (translatable_id, locale);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment