Database diagrams editor that allows you to visualize and design your DB with a single query.
TypeScript databasedbdb-migrationeditorerdmariadbmssqlmysqlpostgresqlreactreact-flowschema-migrationssqlsqlitetypescriptvisualizationxyflow
import type { Diagram } from '@/lib/domain/diagram';
import EmployeeExample from '../../../assets/examples/employees_example.png';
import EmployeeExampleDark from '../../../assets/examples/employees_example_dark.png';
import BikeStoresExample from '../../../assets/examples/bike_stores_example.png';
import BikeStoresExampleDark from '../../../assets/examples/bike_stores_example_dark.png';
import DVDRentalExample from '../../../assets/examples/dvd_rental_example.png';
import DVDRentalExampleDark from '../../../assets/examples/dvd_rental_example_dark.png';
import { DatabaseType } from '@/lib/domain/database-type';
export interface Example {
id: string;
name: string;
description: string;
image: string;
imageDark: string;
diagram: Diagram;
}
const now = Date.now();
export const examples: Example[] = [
{
id: '1',
name: 'Employees schema',
description:
'A schema for database of employees, departments, and salaries.',
image: EmployeeExample,
imageDark: EmployeeExampleDark,
diagram: {
id: 'diagramexample03',
name: 'employees-db',
createdAt: new Date(),
updatedAt: new Date(),
databaseType: DatabaseType.MYSQL,
tables: [
{
id: '0v5u6f9ut8se5m0v3ky84nvhr',
name: 'dept_manager',
x: 557.6896873390228,
y: 198.6124125064391,
fields: [
{
id: '2jhyignhl50o2ui6jo3gqr8dm',
name: 'emp_no',
type: {
id: 'int',
name: 'int',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 't565329xzlimigp28iuzr04fh',
name: 'dept_no',
type: {
id: 'char',
name: 'char',
},
primaryKey: true,
unique: true,
nullable: false,
characterMaximumLength: '4',
collation: 'utf8mb4_general_ci',
createdAt: now,
},
{
id: 'rh1kertl9963xxnddmzl9l3r8',
name: 'from_date',
type: {
id: 'date',
name: 'date',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'hxp5h407xy6w5vy30yfxr9sft',
name: 'to_date',
type: {
id: 'date',
name: 'date',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
],
indexes: [
{
id: 'z1dww9ogjdxx3ydubvpynecgp',
name: 'emp_no',
unique: true,
fieldIds: ['2jhyignhl50o2ui6jo3gqr8dm'],
createdAt: now,
},
{
id: 'lhe5ayrog61nrue2sg5xjcdhz',
name: 'dept_no',
unique: true,
fieldIds: ['t565329xzlimigp28iuzr04fh'],
createdAt: now,
},
{
id: 'ztry38smm0oyc3fvjmp9rgcpj',
name: 'dept_no',
unique: false,
fieldIds: ['t565329xzlimigp28iuzr04fh'],
createdAt: now,
},
],
color: '#7175fa',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: '42lp0rp8nos43hvi9mwa02nil',
name: 'employees',
x: 75.63583762234259,
y: 19.062062532195426,
fields: [
{
id: '7imy212cnnhkoz0ynvnf9djhs',
name: 'emp_no',
type: {
id: 'int',
name: 'int',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'mrym2eog3nvdbbrm196lvii3e',
name: 'birth_date',
type: {
id: 'date',
name: 'date',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'i7ye1fomuhonviuhygqicad5g',
name: 'first_name',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: false,
unique: false,
nullable: false,
characterMaximumLength: '14',
collation: 'utf8mb4_general_ci',
createdAt: now,
},
{
id: 'lmp584e9w7yndwhpfot692kod',
name: 'last_name',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: false,
unique: false,
nullable: false,
characterMaximumLength: '16',
collation: 'utf8mb4_general_ci',
createdAt: now,
},
{
id: 'jaycd610pxfna312yy0zewslx',
name: 'gender',
type: {
id: 'enum',
name: 'enum',
},
primaryKey: false,
unique: false,
nullable: false,
characterMaximumLength: '1',
collation: 'utf8mb4_general_ci',
createdAt: now,
},
{
id: 'i62ma6wzanh9yytgu0ka55nrg',
name: 'hire_date',
type: {
id: 'date',
name: 'date',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
],
indexes: [
{
id: 'ps5xmxaldvzt4985n2kb7sqyz',
name: 'emp_no',
unique: true,
fieldIds: ['7imy212cnnhkoz0ynvnf9djhs'],
createdAt: now,
},
],
color: '#4dee8a',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'ih09a05rw3v1wdwr79r8teelq',
name: 'dept_emp_latest_date',
x: -202.8840877511243,
y: 558.3875874935609,
fields: [
{
id: 'kw3xbpokomfjbhfxofsrmem1v',
name: 'emp_no',
type: {
id: 'int',
name: 'int',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'grnivrq1ac6zs0d83wbxsqcnw',
name: 'from_date',
type: {
id: 'date',
name: 'date',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'rpqhjleo5xv20l9c8m2c292q3',
name: 'to_date',
type: {
id: 'date',
name: 'date',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
],
indexes: [],
color: '#b067e9',
isView: true,
isMaterializedView: false,
createdAt: now,
width: 337,
},
{
id: 'irlzbe7hbbk0cajuzn03ggpj1',
name: 'dept_emp',
x: 553.5737750901473,
y: -20.278674729558468,
fields: [
{
id: '9ol727np1ejppctsu04g6u8wy',
name: 'emp_no',
type: {
id: 'int',
name: 'int',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'ogl1jeev8utkhd0d9ki2lcdig',
name: 'dept_no',
type: {
id: 'char',
name: 'char',
},
primaryKey: true,
unique: true,
nullable: false,
characterMaximumLength: '4',
collation: 'utf8mb4_general_ci',
createdAt: now,
},
{
id: 'd19d7qoxpj7l735puyd01elf9',
name: 'from_date',
type: {
id: 'date',
name: 'date',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: '8s5mwet4cbwg7nvukg8ns51lo',
name: 'to_date',
type: {
id: 'date',
name: 'date',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
],
indexes: [
{
id: 'ofupnhaghxggio7tfpro378sp',
name: 'emp_no',
unique: true,
fieldIds: ['9ol727np1ejppctsu04g6u8wy'],
createdAt: now,
},
{
id: '4acasluljq771tqibfc7zxxfz',
name: 'dept_no',
unique: true,
fieldIds: ['ogl1jeev8utkhd0d9ki2lcdig'],
createdAt: now,
},
{
id: 'gtfoqzp6w3i8qnfvp87hfztaf',
name: 'dept_no',
unique: false,
fieldIds: ['ogl1jeev8utkhd0d9ki2lcdig'],
createdAt: now,
},
],
color: '#7175fa',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'j9oi3glt3atr8wyli77fwxkvt',
name: 'salaries',
x: -267,
y: -120,
fields: [
{
id: '3vdlfomjyv59fx8sfo0un8our',
name: 'emp_no',
type: {
id: 'int',
name: 'int',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: '5nl9xal0onxgmr55i9otob49i',
name: 'salary',
type: {
id: 'int',
name: 'int',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'udcoj1mtmhvrujxsg9mtbs9nn',
name: 'from_date',
type: {
id: 'date',
name: 'date',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'fwd9n15sxosfno618zok6d271',
name: 'to_date',
type: {
id: 'date',
name: 'date',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'j68dufw81rshevpo1pa70f88g',
name: 'price',
type: {
id: 'decimal',
name: 'decimal',
},
primaryKey: false,
unique: false,
nullable: true,
precision: 10,
scale: 2,
default: '13.21',
createdAt: now,
},
],
indexes: [
{
id: 'lwrffmcum0n71smamwzg35abh',
name: 'emp_no',
unique: true,
fieldIds: ['3vdlfomjyv59fx8sfo0un8our'],
createdAt: now,
},
{
id: 'sbt0guv0fasl409w2uaem4de7',
name: 'from_date',
unique: true,
fieldIds: ['udcoj1mtmhvrujxsg9mtbs9nn'],
createdAt: now,
},
],
color: '#4dee8a',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'jcxfe2dk2ioeqnxgn0wt81yg7',
name: 'departments',
x: 1071,
y: 77.51171255795174,
fields: [
{
id: '88cacbdeme4bkl9mjspyak67a',
name: 'dept_no',
type: {
id: 'char',
name: 'char',
},
primaryKey: true,
unique: true,
nullable: false,
characterMaximumLength: '4',
collation: 'utf8mb4_general_ci',
createdAt: now,
},
{
id: 'zoaiijxv43lhgmlhidajykopu',
name: 'dept_name',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: false,
unique: true,
nullable: false,
characterMaximumLength: '40',
collation: 'utf8mb4_general_ci',
createdAt: now,
},
],
indexes: [
{
id: '5gidjryeumcqqdqgs6ovak7km',
name: 'dept_no',
unique: true,
fieldIds: ['88cacbdeme4bkl9mjspyak67a'],
createdAt: now,
},
{
id: 'sc6tnwwz6k7zjyk29dqabhw57',
name: 'dept_name',
unique: true,
fieldIds: ['zoaiijxv43lhgmlhidajykopu'],
createdAt: now,
},
],
color: '#ff6363',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'tyn4e3uh8gy6t4vad8lxymdvo',
name: 'current_dept_emp',
x: 178.69790015453802,
y: 524.8372375193172,
fields: [
{
id: 'ig4pxvhw485x2b4zdb5955phg',
name: 'emp_no',
type: {
id: 'int',
name: 'int',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'p69dh249cmuduy3ey41j852wt',
name: 'dept_no',
type: {
id: 'char',
name: 'char',
},
primaryKey: false,
unique: false,
nullable: false,
characterMaximumLength: '4',
collation: 'utf8mb4_general_ci',
createdAt: now,
},
{
id: 'u4xm33hvc9nxfqhxvfn9wxzf5',
name: 'from_date',
type: {
id: 'date',
name: 'date',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'o2610vc45t7ckk3spzcevmwru',
name: 'to_date',
type: {
id: 'date',
name: 'date',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
],
indexes: [],
color: '#b067e9',
isView: true,
isMaterializedView: false,
createdAt: now,
},
{
id: 'v34irxijeumu5jfjibgv495nj',
name: 'titles',
x: -251,
y: 220,
fields: [
{
id: 'hiqth6r7y6cd03cy07mdr46za',
name: 'emp_no',
type: {
id: 'int',
name: 'int',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'lkil3ty0yx6ibygk0woqzthjg',
name: 'title',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: true,
unique: true,
nullable: false,
characterMaximumLength: '50',
collation: 'utf8mb4_general_ci',
createdAt: now,
},
{
id: 'uc809iij5ykwvqh6f2h62wsng',
name: 'from_date',
type: {
id: 'date',
name: 'date',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'unk2di9t5cp2qt61x68ictil5',
name: 'to_date',
type: {
id: 'date',
name: 'date',
},
primaryKey: false,
unique: false,
nullable: true,
default: 'NULL',
createdAt: now,
},
],
indexes: [
{
id: 'tu97q24ogqstahsa7b5ye1vcq',
name: 'emp_no',
unique: true,
fieldIds: ['hiqth6r7y6cd03cy07mdr46za'],
createdAt: now,
},
{
id: 'mangaztv947jn1x440cxeh4u8',
name: 'title',
unique: true,
fieldIds: ['lkil3ty0yx6ibygk0woqzthjg'],
createdAt: now,
},
{
id: '4mhewlev5wrrwgz0j4lfqeaxy',
name: 'from_date',
unique: true,
fieldIds: ['uc809iij5ykwvqh6f2h62wsng'],
createdAt: now,
},
],
color: '#4dee8a',
isView: false,
isMaterializedView: false,
createdAt: now,
},
],
relationships: [
{
id: '333gtl2u9yhcpu8i2zzckcokw',
name: 'titles_ibfk_1',
sourceTableId: 'v34irxijeumu5jfjibgv495nj',
targetTableId: '42lp0rp8nos43hvi9mwa02nil',
sourceFieldId: 'hiqth6r7y6cd03cy07mdr46za',
targetFieldId: '7imy212cnnhkoz0ynvnf9djhs',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: '3x7h57mfdbnhdhrf63ldkyezl',
name: 'dept_emp_ibfk_2',
sourceTableId: 'irlzbe7hbbk0cajuzn03ggpj1',
targetTableId: 'jcxfe2dk2ioeqnxgn0wt81yg7',
sourceFieldId: 'ogl1jeev8utkhd0d9ki2lcdig',
targetFieldId: '88cacbdeme4bkl9mjspyak67a',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'dekaz2lgougsjw1c5cgoceo2i',
name: 'salaries_ibfk_1',
sourceTableId: 'j9oi3glt3atr8wyli77fwxkvt',
targetTableId: '42lp0rp8nos43hvi9mwa02nil',
sourceFieldId: '3vdlfomjyv59fx8sfo0un8our',
targetFieldId: '7imy212cnnhkoz0ynvnf9djhs',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'el0w7xenegliqptjdh7g0y98p',
name: 'dept_manager_ibfk_1',
sourceTableId: '0v5u6f9ut8se5m0v3ky84nvhr',
targetTableId: '42lp0rp8nos43hvi9mwa02nil',
sourceFieldId: '2jhyignhl50o2ui6jo3gqr8dm',
targetFieldId: '7imy212cnnhkoz0ynvnf9djhs',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'pzylntli2tqyari2ycmrso355',
name: 'dept_emp_ibfk_1',
sourceTableId: 'irlzbe7hbbk0cajuzn03ggpj1',
targetTableId: '42lp0rp8nos43hvi9mwa02nil',
sourceFieldId: '9ol727np1ejppctsu04g6u8wy',
targetFieldId: '7imy212cnnhkoz0ynvnf9djhs',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'w65slx46wuocr3jyw1167e906',
name: 'dept_manager_ibfk_2',
sourceTableId: '0v5u6f9ut8se5m0v3ky84nvhr',
targetTableId: 'jcxfe2dk2ioeqnxgn0wt81yg7',
sourceFieldId: 't565329xzlimigp28iuzr04fh',
targetFieldId: '88cacbdeme4bkl9mjspyak67a',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
],
dependencies: [],
areas: [
{
id: 'dx6spmeb8sklnvobmb5thjl6c',
name: 'Department Info',
x: 983.3008465847729,
y: -2.806121367657312,
width: 388,
height: 284,
color: '#ff6363',
},
{
id: 'e8wircz48u76we7tw5plx8pkr',
name: 'Current Status',
x: -307.5099582312877,
y: 479.9909168127539,
width: 778,
height: 252,
color: '#c05dcf',
},
{
id: 'ji4zoge706yo6qq4q0shxnxxz',
name: 'Employee Info',
x: -333.4589215867312,
y: -181.99524614662528,
width: 708,
height: 619,
color: '#8eb7ff',
},
{
id: 'r28u6h0cn9h8h9w83pco2ulej',
name: 'Dept-Emp Info',
x: 475.8612768935129,
y: -153.63415370064985,
width: 424,
height: 606,
color: '#ff9f74',
},
],
},
},
{
id: '2',
name: 'Bike stores schema',
description:
'A schema for database of bike stores, brands, categories, and customers.',
image: BikeStoresExample,
imageDark: BikeStoresExampleDark,
diagram: {
id: 'diagramexample03',
name: 'bike_stores-db',
createdAt: new Date(),
updatedAt: new Date(),
databaseType: DatabaseType.POSTGRESQL,
tables: [
{
id: '670reoxb6g8rvsgxnbtikxxbl',
name: 'brands',
x: 1394.728667830407,
y: 361.6670725797467,
fields: [
{
id: 'jdox8nnjiavki6il4ynugsp2r',
name: 'brand_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: '38c4vqtl35ga4eggu7hkbcfx3',
name: 'brand_name',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
],
indexes: [
{
id: 'cq7bkwegshjpbt90xldwt3haq',
name: 'brands_pkey',
unique: true,
fieldIds: ['jdox8nnjiavki6il4ynugsp2r'],
createdAt: now,
},
],
color: '#b067e9',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'a5qrftvetg83ujanoizn8tny2',
name: 'categories',
x: 1391.3475899291334,
y: 643.413291363584,
fields: [
{
id: 'nfadt1kp53zvjg82uamcshc6p',
name: 'category_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: '6htpnkgq25w3i2oyr4hbe9goj',
name: 'category_name',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
],
indexes: [
{
id: 'nekdae4u5kjqzsdyw1xgw26lw',
name: 'categories_pkey',
unique: true,
fieldIds: ['nfadt1kp53zvjg82uamcshc6p'],
createdAt: now,
},
],
color: '#b067e9',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'cmu94c2uqhd53wxulug54hq38',
name: 'stocks',
x: 662.7541000002183,
y: 1017.6255054768152,
fields: [
{
id: 'p4a9y5joxh9f77m1z2u3u3zvq',
name: 'store_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'fuspl3bqd4e5tkaslfdfycq3e',
name: 'product_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: true,
nullable: false,
createdAt: now,
},
{
id: '8jl2ql3lq58xs2f4fc26oezmv',
name: 'quantity',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
],
indexes: [
{
id: '1ayfy6nz637jxav3vf6v5rcjn',
name: 'stocks_pkey',
unique: true,
fieldIds: ['p4a9y5joxh9f77m1z2u3u3zvq'],
createdAt: now,
},
{
id: 'mzaqgi6s8ykml8pquo6xfyosh',
name: 'stocks_pkey',
unique: true,
fieldIds: ['fuspl3bqd4e5tkaslfdfycq3e'],
createdAt: now,
},
],
color: '#ff6b8a',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'gff2gs4950o9yjcvumw9kdyhm',
name: 'order_items',
x: 651.9294006551768,
y: 433.28060402465775,
fields: [
{
id: 'p64yzlmv68krpmav3vnq457sa',
name: 'order_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'kbepxb6quw85u22e32gr7nksm',
name: 'item_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'd5vddbxei36fx12ejvs0h3qvu',
name: 'product_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '087y0wsjv2uepm21d31wkh2xf',
name: 'quantity',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '01paon6qttasknrt1w8u9kk8w',
name: 'list_price',
type: {
id: 'numeric',
name: 'numeric',
},
primaryKey: false,
unique: false,
nullable: true,
precision: 10,
scale: 2,
createdAt: now,
},
{
id: 'afy851qhl1x8to0w6r90dq6vs',
name: 'discount',
type: {
id: 'numeric',
name: 'numeric',
},
primaryKey: false,
unique: false,
nullable: true,
precision: 4,
scale: 2,
default: '0',
createdAt: now,
},
],
indexes: [
{
id: 'mlqxo50axkvgfpu8tvgi2x9q3',
name: 'order_items_pkey',
unique: true,
fieldIds: ['p64yzlmv68krpmav3vnq457sa'],
createdAt: now,
},
{
id: 'mbxg2wf13rs0bxaepj8iccel1',
name: 'order_items_pkey',
unique: true,
fieldIds: ['kbepxb6quw85u22e32gr7nksm'],
createdAt: now,
},
],
color: '#8eb7ff',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'lolzwhrbovoqc3z01e2ow74cr',
name: 'products',
x: 1091.698276835409,
y: 444.6722944615217,
fields: [
{
id: 'pp1z9gg74ivqg745qoivl8qrm',
name: 'product_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'zu4rui8eh40prjyi1gdkz11ef',
name: 'product_name',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'u9acmoo8ctx6pza49ovylai1s',
name: 'brand_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'c04v6tuqnegyom6ba6gh5ep64',
name: 'category_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '7v8jketbpvtpmm8z7xneaony7',
name: 'model_year',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '7d0buw6k3s3cjq715jonezpra',
name: 'list_price',
type: {
id: 'numeric',
name: 'numeric',
},
primaryKey: false,
unique: false,
nullable: true,
precision: 10,
scale: 2,
createdAt: now,
},
],
indexes: [
{
id: 'pk5kpru83gz13ml4lgt35js4t',
name: 'products_pkey',
unique: true,
fieldIds: ['pp1z9gg74ivqg745qoivl8qrm'],
createdAt: now,
},
],
color: '#b067e9',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'm23lw2snuvpvhgxbcb7ol7rd2',
name: 'staff',
x: -63.91318055866841,
y: 854.888845122481,
fields: [
{
id: '6fht054qctqmxfb1qfqkxt7p9',
name: 'staff_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'tuaavynuktclavbwz4cokpbj1',
name: 'first_name',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 't70h7vdhdub1nsbbeoicrz7q4',
name: 'last_name',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'mexhqhtnbw3i5sualbxb5fden',
name: 'email',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'itrvyvfcl497p80h1igot8pib',
name: 'phone',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'rhc8avz6o474jmfdxm1he6yz5',
name: 'active',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'x0t8hac79viu9il07l4wfsu93',
name: 'store_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'uz9p9wyu5egjoh3a4qno3rwd6',
name: 'manager_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
],
indexes: [
{
id: '2yrbds32i4zee74y307pcmur4',
name: 'staff_pkey',
unique: true,
fieldIds: ['6fht054qctqmxfb1qfqkxt7p9'],
createdAt: now,
},
],
color: '#ff6363',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'nhmv0a04rms91zfpvgheofs9p',
name: 'orders',
x: 364.309202433514,
y: 373.63360074877346,
fields: [
{
id: 'wkni57dsr3mlfvn419xrl3yjh',
name: 'order_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: '4mboqizdb99mli0zpc0lbgf0x',
name: 'customer_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'ovi91x7yjl86cjnwcyjxrqukg',
name: 'order_status',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'tzufwt75xfx6szi7smiqn2pen',
name: 'order_date',
type: {
id: 'date',
name: 'date',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'zqat78rj8ap9chid6zfwkr8or',
name: 'required_date',
type: {
id: 'date',
name: 'date',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'nt13tnj4hz9tpsvo9jtfl9iu3',
name: 'shipped_date',
type: {
id: 'date',
name: 'date',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'm1jbg5l2ug5vjtoy6zjrlekk0',
name: 'store_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'awsulsrytikpr6zig5cby0fbe',
name: 'staff_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
],
indexes: [
{
id: '0vqsfgj78zbmsct8pgf6pm47f',
name: 'orders_pkey',
unique: true,
fieldIds: ['wkni57dsr3mlfvn419xrl3yjh'],
createdAt: now,
},
],
color: '#8eb7ff',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'ski50jee1ua81y4gtplc3pyfm',
name: 'customers',
x: -98.40681700386897,
y: 400.38782401539135,
fields: [
{
id: 'usyuityjgtecms1fq7l7156ej',
name: 'customer_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: '0cobqs5h4l0aubfqesjwc2t73',
name: 'first_name',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '50roeoexzrfjzz16in3clmzr5',
name: 'last_name',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '3hdlyyc2ece43w52qat5n57fc',
name: 'phone',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'qmtlh30vyukuj2qrew5wvrfs5',
name: 'email',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'zaoqju5csia54f48xymcaghtc',
name: 'street',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'yzv6s9k1u2gnf0x988r8n2p0m',
name: 'city',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'bnropvp4ukwv0t6gvhe4eonc9',
name: 'state',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '7fjz2berdq0whe84205jdl1bt',
name: 'zip_code',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
],
indexes: [
{
id: 'p8fsfh7op2s4chrat4ntjlnvo',
name: 'customers_pkey',
unique: true,
fieldIds: ['usyuityjgtecms1fq7l7156ej'],
createdAt: now,
},
],
color: '#ffe374',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'un4bv3rw73vx96rn7jvkg3j9m',
name: 'stores',
x: 348.6796556042351,
y: 865.2483907485604,
fields: [
{
id: 'dw6au3yuj8eme8elwc6deptdp',
name: 'store_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'kmnwpwlgy3g6jtpkydbk9o7sy',
name: 'store_name',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'otid99xfcgk54yss7o1isghkr',
name: 'phone',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '5i9lrajzayno9u5tem61dyeug',
name: 'email',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'kwafnmy97n7iyngpa6qpm4pe4',
name: 'street',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'mbjwn4dufrxu9immg90rcmxvh',
name: 'city',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '81u3amef1pbxuu03o0xicm2c3',
name: 'state',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '6n1uh4a15ljdb16wp7dp33p43',
name: 'zip_code',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
],
indexes: [
{
id: 'l663h0occkxclgwr3wzr1ebta',
name: 'stores_pkey',
unique: true,
fieldIds: ['dw6au3yuj8eme8elwc6deptdp'],
createdAt: now,
},
],
color: '#ff6b8a',
isView: false,
isMaterializedView: false,
createdAt: now,
},
],
relationships: [
{
id: '9hpqiz7di5w6acvug84lxv239',
name: 'fk__products__brand___3b75d760',
sourceTableId: 'lolzwhrbovoqc3z01e2ow74cr',
targetTableId: '670reoxb6g8rvsgxnbtikxxbl',
sourceFieldId: 'u9acmoo8ctx6pza49ovylai1s',
targetFieldId: 'jdox8nnjiavki6il4ynugsp2r',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'cbnfoc2sfqb7hblv47sj8gws5',
name: 'fk__stocks__store_id__5070f446',
sourceTableId: 'cmu94c2uqhd53wxulug54hq38',
targetTableId: 'un4bv3rw73vx96rn7jvkg3j9m',
sourceFieldId: 'p4a9y5joxh9f77m1z2u3u3zvq',
targetFieldId: 'dw6au3yuj8eme8elwc6deptdp',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'gl3zdj13cjt7dewddztr1mpif',
name: 'fk__orders__customer__46e78a0c',
sourceTableId: 'nhmv0a04rms91zfpvgheofs9p',
targetTableId: 'ski50jee1ua81y4gtplc3pyfm',
sourceFieldId: '4mboqizdb99mli0zpc0lbgf0x',
targetFieldId: 'usyuityjgtecms1fq7l7156ej',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'guudpcytdecmcxpgj0b7roybh',
name: 'fk__stocks__product___5165187f',
sourceTableId: 'cmu94c2uqhd53wxulug54hq38',
targetTableId: 'lolzwhrbovoqc3z01e2ow74cr',
sourceFieldId: 'fuspl3bqd4e5tkaslfdfycq3e',
targetFieldId: 'pp1z9gg74ivqg745qoivl8qrm',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'lvssf28solzcg1ai41c5p8h5i',
name: 'fk__products__catego__3a81b327',
sourceTableId: 'lolzwhrbovoqc3z01e2ow74cr',
targetTableId: 'a5qrftvetg83ujanoizn8tny2',
sourceFieldId: 'c04v6tuqnegyom6ba6gh5ep64',
targetFieldId: 'nfadt1kp53zvjg82uamcshc6p',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 't1xzeu9mhl8kgi1774sntkx8i',
name: 'fk__order_ite__produ__4d94879b',
sourceTableId: 'gff2gs4950o9yjcvumw9kdyhm',
targetTableId: 'lolzwhrbovoqc3z01e2ow74cr',
sourceFieldId: 'd5vddbxei36fx12ejvs0h3qvu',
targetFieldId: 'pp1z9gg74ivqg745qoivl8qrm',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'tj1twywa2j0yyk5ngsc6a71kq',
name: 'fk__orders__store_id__47dbae45',
sourceTableId: 'nhmv0a04rms91zfpvgheofs9p',
targetTableId: 'un4bv3rw73vx96rn7jvkg3j9m',
sourceFieldId: 'm1jbg5l2ug5vjtoy6zjrlekk0',
targetFieldId: 'dw6au3yuj8eme8elwc6deptdp',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'u0pr5i7ujvijx4kbcg9uztm82',
name: 'fk__staff__store_id__4316f928',
sourceTableId: 'm23lw2snuvpvhgxbcb7ol7rd2',
targetTableId: 'un4bv3rw73vx96rn7jvkg3j9m',
sourceFieldId: 'x0t8hac79viu9il07l4wfsu93',
targetFieldId: 'dw6au3yuj8eme8elwc6deptdp',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'ueh4l3exliz1yd51o80hjhjui',
name: 'fk__orders__staff_id__48cfd27e',
sourceTableId: 'nhmv0a04rms91zfpvgheofs9p',
targetTableId: 'm23lw2snuvpvhgxbcb7ol7rd2',
sourceFieldId: 'awsulsrytikpr6zig5cby0fbe',
targetFieldId: '6fht054qctqmxfb1qfqkxt7p9',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'v6mk8aebazx7f52fayrgmf6iw',
name: 'fk__order_ite__order__4ca06362',
sourceTableId: 'gff2gs4950o9yjcvumw9kdyhm',
targetTableId: 'nhmv0a04rms91zfpvgheofs9p',
sourceFieldId: 'p64yzlmv68krpmav3vnq457sa',
targetFieldId: 'wkni57dsr3mlfvn419xrl3yjh',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
],
dependencies: [],
areas: [
{
id: 'a5fbljzmsx2bvhejcxbr31fq7',
name: 'Store & Stock',
x: -119.89592188151653,
y: 781.3936659473771,
width: 1044,
height: 404,
color: '#7175fa',
},
{
id: 'd26fo9yv1781pgacukphawdys',
name: 'Product Info',
x: 1053.5812520979289,
y: 259.6474958332114,
width: 599,
height: 566,
color: '#9ef07a',
},
{
id: 'm0n67kk1ccrbqz9galbr3v13a',
name: 'Order Management',
x: 267.70789589037787,
y: 296.38763559214476,
width: 649,
height: 407,
color: '#ff6b8a',
},
{
id: 'v09b1onoeiw6ytpcln1xcdp1t',
name: 'Customer Info',
x: -140,
y: 280,
width: 352,
height: 475,
color: '#ffe374',
},
],
},
},
{
id: '3',
name: 'DVD Rental schema',
image: DVDRentalExample,
imageDark: DVDRentalExampleDark,
description:
'A schema for database of a DVD rental store, including customers, films, actors, staff, and stores.',
diagram: {
id: 'diagramexample03',
name: 'dvdrental-db',
createdAt: new Date(),
updatedAt: new Date(),
databaseType: DatabaseType.POSTGRESQL,
tables: [
{
id: '34yt1qc2aa0ry1xlfff635xpi',
name: 'staff',
x: -731.3101077132125,
y: -212.82662114388555,
fields: [
{
id: '54i12h4z3uodcr72i1qcfr3ks',
name: 'staff_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
default: "nextval('staff_staff_id_seq'::regclass)",
createdAt: now,
},
{
id: 's1xlc5ncssu6jmxyv83bjw7gx',
name: 'first_name',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: false,
characterMaximumLength: '45',
createdAt: now,
},
{
id: 'eqqhj70cyyxddwm1ujtq1pa89',
name: 'last_name',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: false,
characterMaximumLength: '45',
createdAt: now,
},
{
id: 'uhl87fgu2gxu18c7jj7a9lnz4',
name: 'address_id',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: '6hpgqyqicnbrcgb4vxx562b5y',
name: 'email',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
characterMaximumLength: '50',
createdAt: now,
},
{
id: 'yc86xzpcfw61uotgd8ocg7u0h',
name: 'store_id',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: '286y7goo0xhazns6v7lfsyv0l',
name: 'active',
type: {
id: 'boolean',
name: 'boolean',
},
primaryKey: false,
unique: false,
nullable: false,
default: 'true',
createdAt: now,
},
{
id: 'lnacynot0n8g8sqxv2n9jrngh',
name: 'username',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: false,
characterMaximumLength: '16',
createdAt: now,
},
{
id: '4iv9rloc60nsg5ngjcl3jx783',
name: 'password',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
characterMaximumLength: '40',
createdAt: now,
},
{
id: '4x5w6xro2kexc7arddeqk09g9',
name: 'last_update',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: false,
default: 'now()',
createdAt: now,
},
{
id: 'ejhfuxg4qr8yfemjwgk3zivmv',
name: 'picture',
type: {
id: 'bytea',
name: 'bytea',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
],
indexes: [
{
id: 'ycal57bnptf8u1hr8m8ohq0px',
name: 'staff_pkey',
unique: true,
fieldIds: ['54i12h4z3uodcr72i1qcfr3ks'],
createdAt: now,
},
],
color: '#8a61f5',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: '3xlkv9xztz29x0bgrw5nrzf3t',
name: 'film_category',
x: 66.82521602202738,
y: 1164.3379709100898,
fields: [
{
id: '0y1h3uwzkcyyaeesbyr7uiam2',
name: 'film_id',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'rt6bj37fpip85o17q505xeras',
name: 'category_id',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: true,
nullable: false,
createdAt: now,
},
{
id: '8ajtbcyiso1wm7ybkk1s6gaku',
name: 'last_update',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: false,
default: 'now()',
createdAt: now,
},
],
indexes: [
{
id: 'ot1p1a379nnx0b6qdjdhbypwp',
name: 'film_category_pkey',
unique: true,
fieldIds: ['rt6bj37fpip85o17q505xeras'],
createdAt: now,
},
{
id: 'y534dwkyo7tee5kez2tlvfu3l',
name: 'film_category_pkey',
unique: true,
fieldIds: ['0y1h3uwzkcyyaeesbyr7uiam2'],
createdAt: now,
},
],
color: '#8eb7ff',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'btxa10fqejctzsz9y22z93dto',
name: 'film_actor',
x: 361.01126789702414,
y: 461.42942416437415,
fields: [
{
id: 'qv45deuvh3ztz277pnptifai5',
name: 'actor_id',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'mes2rjjt47i1qj8qgy9xtt2sd',
name: 'film_id',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'qkxjgbuq7dcpnvyax0c7cj92s',
name: 'last_update',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: false,
default: 'now()',
createdAt: now,
},
],
indexes: [
{
id: 'grflheiixkrg55o4r5klwdfki',
name: 'film_actor_pkey',
unique: true,
fieldIds: ['qv45deuvh3ztz277pnptifai5'],
createdAt: now,
},
{
id: 'zen76thitkd6wtotwgjwe91vm',
name: 'idx_fk_film_id',
unique: false,
fieldIds: ['mes2rjjt47i1qj8qgy9xtt2sd'],
createdAt: now,
},
{
id: 'wubhwftcrqcrzfsmemgxevrha',
name: 'film_actor_pkey',
unique: true,
fieldIds: ['mes2rjjt47i1qj8qgy9xtt2sd'],
createdAt: now,
},
],
color: '#42e0c0',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'cq7xhw34n8yos6oo6j0ri8lqq',
name: 'country',
x: -367.22430798395044,
y: 589.6264253807967,
fields: [
{
id: 'x773jd75qcqg9ajiyl29bjggo',
name: 'country_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
default:
"nextval('country_country_id_seq'::regclass)",
createdAt: now,
},
{
id: 'gnw6a7ykjx9mp9vzjg1voj2g8',
name: 'country',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: false,
characterMaximumLength: '50',
createdAt: now,
},
{
id: 'wods540u7p30b17ji1ypzq11z',
name: 'last_update',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: false,
default: 'now()',
createdAt: now,
},
],
indexes: [
{
id: 'zw1cemwd22dmka9n5s7kyhe7y',
name: 'country_pkey',
unique: true,
fieldIds: ['x773jd75qcqg9ajiyl29bjggo'],
createdAt: now,
},
],
color: '#ff6363',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'ea4vdndmk0mzj37pxmnbnng6x',
name: 'address',
x: -636.7645743169105,
y: 462.9917166782857,
fields: [
{
id: 'i6qxuuf9xst3t7rc699nc0hgq',
name: 'address_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
default:
"nextval('address_address_id_seq'::regclass)",
createdAt: now,
},
{
id: 'f5fgkdieedc4b3d0sfev8fejc',
name: 'address',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: false,
characterMaximumLength: '50',
createdAt: now,
},
{
id: 'noo5497gxwm4l17ya3wh8dmz5',
name: 'address2',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
characterMaximumLength: '50',
createdAt: now,
},
{
id: '48jx2ug65pbcz3w9fi1p2x217',
name: 'district',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: false,
characterMaximumLength: '20',
createdAt: now,
},
{
id: 'jfavtmtso40cwyhe09f7i1753',
name: 'city_id',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 's98qjvoi5ffboyst6fmr8u995',
name: 'postal_code',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
characterMaximumLength: '10',
createdAt: now,
},
{
id: '1ktbczifaj2ggzbkbuigs2f0c',
name: 'phone',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: false,
characterMaximumLength: '20',
createdAt: now,
},
{
id: 'pm7kl015bgbfvr0hy76ueu1qn',
name: 'last_update',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: false,
default: 'now()',
createdAt: now,
},
],
indexes: [
{
id: 'zhxnuguyh3iehb1myf13ld5ha',
name: 'address_pkey',
unique: true,
fieldIds: ['i6qxuuf9xst3t7rc699nc0hgq'],
createdAt: now,
},
{
id: 'bwc2yssarsfc7wwnecn7smh0z',
name: 'idx_fk_city_id',
unique: false,
fieldIds: ['jfavtmtso40cwyhe09f7i1753'],
createdAt: now,
},
],
color: '#ff6363',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'ernqqm8aiy3d8k2ljq35h1vwx',
name: 'film',
x: 419.46255745123165,
y: 733.0970856894776,
fields: [
{
id: '66dmeakl4z56mljzwgvttodic',
name: 'film_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
default: "nextval('film_film_id_seq'::regclass)",
createdAt: now,
},
{
id: 'uiblxhw1gvfndhmy4jwxwrlcn',
name: 'title',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: false,
characterMaximumLength: '255',
createdAt: now,
},
{
id: 'ufgspotxz5v34ytwi9hk84txv',
name: 'description',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'aaxe3h4jvhqaeywx5bjicstxy',
name: 'release_year',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: '84sf02yyd4hdvz4d01knzbmhk',
name: 'language_id',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'qv4lmue1plykh5fow912ncs8m',
name: 'rental_duration',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
default: '3',
createdAt: now,
},
{
id: '2e6px066xtpoga3ny7d4sq7i0',
name: 'rental_rate',
type: {
id: 'numeric',
name: 'numeric',
},
primaryKey: false,
unique: false,
nullable: false,
precision: 4,
scale: 2,
default: '4.99',
createdAt: now,
},
{
id: 'cszo7g1d7wflm794muuvx4qdq',
name: 'length',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'ts4y3qvev2kdpgriv05ln4cs1',
name: 'replacement_cost',
type: {
id: 'numeric',
name: 'numeric',
},
primaryKey: false,
unique: false,
nullable: false,
precision: 5,
scale: 2,
default: '19.99',
createdAt: now,
},
{
id: 'buqu91gxipahcmffek3rqje5v',
name: 'rating',
type: {
id: 'user-defined',
name: 'user-defined',
},
primaryKey: false,
unique: false,
nullable: true,
default: "'G'::mpaa_rating",
createdAt: now,
},
{
id: 'gkg6ghdscnho819zg0ewjsqng',
name: 'last_update',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: false,
default: 'now()',
createdAt: now,
},
{
id: 'yqrnjmizqeu2w7mpfhze3clbj',
name: 'special_features',
type: {
id: 'text',
name: 'text',
},
isArray: true,
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'c89248knl8hfudzoakzps1vxg',
name: 'fulltext',
type: {
id: 'tsvector',
name: 'tsvector',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
],
indexes: [
{
id: 'q4moyrg9jspxqe8rzrotk7dk2',
name: 'film_pkey',
unique: true,
fieldIds: ['66dmeakl4z56mljzwgvttodic'],
createdAt: now,
},
{
id: 'jqzhxwb48gwfozuvpclgh1j71',
name: 'idx_fk_language_id',
unique: false,
fieldIds: ['84sf02yyd4hdvz4d01knzbmhk'],
createdAt: now,
},
{
id: 'opx4m8ieqvh5b9um44znqqt0i',
name: 'idx_title',
unique: false,
fieldIds: ['uiblxhw1gvfndhmy4jwxwrlcn'],
createdAt: now,
},
{
id: 'l540bdijyebkbrlmvs4g63mpj',
name: 'film_fulltext_idx',
unique: false,
fieldIds: ['c89248knl8hfudzoakzps1vxg'],
createdAt: now,
},
],
color: '#8eb7ff',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'g3ge7o85psagng9zan1qvntvf',
name: 'payment',
x: 83.31477489288602,
y: -281.4863882201852,
fields: [
{
id: 'n7nhie8ah79ketvf2r77y6c5c',
name: 'payment_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
default:
"nextval('payment_payment_id_seq'::regclass)",
createdAt: now,
},
{
id: 't15r74n6x4xrbwlhvsnajn5mu',
name: 'customer_id',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'c12w8mec49kzhdf00dbyl4ctd',
name: 'staff_id',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'i37y99hzrq9z3nafghimp6q3a',
name: 'rental_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'bro51xqmtc6hwq9ql80t02adp',
name: 'amount',
type: {
id: 'numeric',
name: 'numeric',
},
primaryKey: false,
unique: false,
nullable: false,
precision: 5,
scale: 2,
createdAt: now,
},
{
id: '9q8ew0bou8yps4vhto03jokk8',
name: 'payment_date',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
],
indexes: [
{
id: '95j1jfw7bk4pdg4iv9ydr7q1g',
name: 'idx_fk_staff_id',
unique: false,
fieldIds: ['c12w8mec49kzhdf00dbyl4ctd'],
createdAt: now,
},
{
id: '33kz15fy24c2lt4p3y7vx96vp',
name: 'payment_pkey',
unique: true,
fieldIds: ['n7nhie8ah79ketvf2r77y6c5c'],
createdAt: now,
},
{
id: 'e68usiqvd3intbr650miybhc4',
name: 'idx_fk_customer_id',
unique: false,
fieldIds: ['t15r74n6x4xrbwlhvsnajn5mu'],
createdAt: now,
},
{
id: '92dhhbiyr99hjjwo2pua3wmob',
name: 'idx_fk_rental_id',
unique: false,
fieldIds: ['i37y99hzrq9z3nafghimp6q3a'],
createdAt: now,
},
],
color: '#ff6b8a',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'gdc1jbkuk641tmanu26hfjxoh',
name: 'store',
x: -1138.6315572757546,
y: 128.7416168208693,
fields: [
{
id: 'sw4uc83e3xd13f8y7gliq2rx7',
name: 'store_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
default: "nextval('store_store_id_seq'::regclass)",
createdAt: now,
},
{
id: 'xeczjzu6ebvm0spupgnesobej',
name: 'manager_staff_id',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: true,
nullable: false,
createdAt: now,
},
{
id: '3l9vxu3klgfvivy3y3q1i7koy',
name: 'address_id',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'n09mfmazxpycdoh1ksulnsvvc',
name: 'last_update',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: false,
default: 'now()',
createdAt: now,
},
],
indexes: [
{
id: 'stnbli0om9zlbdkj392g3evjc',
name: 'idx_unq_manager_staff_id',
unique: true,
fieldIds: ['xeczjzu6ebvm0spupgnesobej'],
createdAt: now,
},
{
id: 'zkz9rvfeql3o12xcnygpllrow',
name: 'store_pkey',
unique: true,
fieldIds: ['sw4uc83e3xd13f8y7gliq2rx7'],
createdAt: now,
},
],
color: '#8a61f5',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'm03oodyufvp9uxjir3uti70r6',
name: 'actor',
x: 18.884934261679035,
y: 434.5735649508925,
fields: [
{
id: 'begg7si6me1l1svr3zv27rfp3',
name: 'actor_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
default: "nextval('actor_actor_id_seq'::regclass)",
createdAt: now,
},
{
id: 'xd4xxiq8g6ioazksend7bex0a',
name: 'first_name',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: false,
characterMaximumLength: '45',
createdAt: now,
},
{
id: 'ymyd7t4fikamq2cg2v0nsa4dy',
name: 'last_name',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: false,
characterMaximumLength: '45',
createdAt: now,
},
{
id: 'ate9rd49jyzffk5hss4eumlrm',
name: 'last_update',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: false,
default: 'now()',
createdAt: now,
},
],
indexes: [
{
id: '2gyalxa5a1chrea8qfjbj3zvf',
name: 'idx_actor_last_name',
unique: false,
fieldIds: ['ymyd7t4fikamq2cg2v0nsa4dy'],
createdAt: now,
},
{
id: 'h19s1f0t1m1sgwnwvdn9p48ny',
name: 'actor_pkey',
unique: true,
fieldIds: ['begg7si6me1l1svr3zv27rfp3'],
createdAt: now,
},
],
color: '#42e0c0',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'mcqn81zhg4ldxsgwzn81phmjk',
name: 'rental',
x: 197.78925592434024,
y: 40.15805805674481,
fields: [
{
id: 'fmlmaurapjll9ebz7o54jtpr2',
name: 'rental_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
default:
"nextval('rental_rental_id_seq'::regclass)",
createdAt: now,
},
{
id: 'ikmury4a6qdgqdrqdirx82zw6',
name: 'rental_date',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: true,
nullable: false,
createdAt: now,
},
{
id: '4lyxh63o5h60t7fvtuoqjfx4e',
name: 'inventory_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'zkl4gi93pago9skvmx0o0scyg',
name: 'customer_id',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: true,
nullable: false,
createdAt: now,
},
{
id: 'o51ff4jg6sp5ghjz9g8qyp51l',
name: 'return_date',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
{
id: 'gsw8sdyuej7dt34a29bysv9fr',
name: 'staff_id',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: '0kzuulkjgmgm67gv0fpwl428r',
name: 'last_update',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: false,
default: 'now()',
createdAt: now,
},
],
indexes: [
{
id: '7g0asqc0bdz0bi57weazibk7h',
name: 'idx_unq_rental_rental_date_inventory_id_customer_id',
unique: true,
fieldIds: ['4lyxh63o5h60t7fvtuoqjfx4e'],
createdAt: now,
},
{
id: 'sveycj3cjg1hbul98n1luaevw',
name: 'idx_unq_rental_rental_date_inventory_id_customer_id',
unique: true,
fieldIds: ['zkl4gi93pago9skvmx0o0scyg'],
createdAt: now,
},
{
id: 't5cbljr7n0furp1vaynejwyuk',
name: 'idx_unq_rental_rental_date_inventory_id_customer_id',
unique: true,
fieldIds: ['ikmury4a6qdgqdrqdirx82zw6'],
createdAt: now,
},
{
id: 'emf5bwlw9dv9ddauczpw0mdh8',
name: 'rental_pkey',
unique: true,
fieldIds: ['fmlmaurapjll9ebz7o54jtpr2'],
createdAt: now,
},
{
id: '1g8fgmo6ybuy5zn8sps79a92n',
name: 'idx_fk_inventory_id',
unique: false,
fieldIds: ['4lyxh63o5h60t7fvtuoqjfx4e'],
createdAt: now,
},
],
color: '#ff6b8a',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'noowyg71ra2jdqmpzongal8k6',
name: 'category',
x: 77.05571595146732,
y: 890.0996986121118,
fields: [
{
id: 'grbcz03z7xihwarkidet47sou',
name: 'category_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
default:
"nextval('category_category_id_seq'::regclass)",
createdAt: now,
},
{
id: 'jwl0e2s0783xlt3njecotej8t',
name: 'name',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: false,
characterMaximumLength: '25',
createdAt: now,
},
{
id: 'st51pcmjvncfk46ihk1s7x3l2',
name: 'last_update',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: false,
default: 'now()',
createdAt: now,
},
],
indexes: [
{
id: 'n3jhbtbbvpvhc54xqr3fmtv0u',
name: 'category_pkey',
unique: true,
fieldIds: ['grbcz03z7xihwarkidet47sou'],
createdAt: now,
},
],
color: '#8eb7ff',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'obr7mfhfjejqleyt42xu6dkbv',
name: 'customer',
x: -400.97107525799214,
y: -65.25794215848296,
fields: [
{
id: '2byrkawoomwtfbo4hlm2dw74y',
name: 'customer_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
default:
"nextval('customer_customer_id_seq'::regclass)",
createdAt: now,
},
{
id: '23qg97erb8vs00z89pu6z1kev',
name: 'store_id',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'ayuysa4j6nt2re26k6zcvyu12',
name: 'first_name',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: false,
characterMaximumLength: '45',
createdAt: now,
},
{
id: 'k0sm6rxdzmkm1tthrih0jl67r',
name: 'last_name',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: false,
characterMaximumLength: '45',
createdAt: now,
},
{
id: 'myftxt8k42s75j2le0sooqejp',
name: 'email',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: true,
characterMaximumLength: '50',
createdAt: now,
},
{
id: 'ehadwyrqcmt3ozy9ub8kkacqm',
name: 'address_id',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'tlp3pm4buiw7by7w8c3uqy5wn',
name: 'activebool',
type: {
id: 'boolean',
name: 'boolean',
},
primaryKey: false,
unique: false,
nullable: false,
default: 'true',
createdAt: now,
},
{
id: '5107oazvnr8nl7s6c2p850nge',
name: 'create_date',
type: {
id: 'date',
name: 'date',
},
primaryKey: false,
unique: false,
nullable: false,
default: "('now'::text)::date",
createdAt: now,
},
{
id: 'de1fl7nbvn19epv8c6qoq7dxu',
name: 'last_update',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: true,
default: 'now()',
createdAt: now,
},
{
id: 'os6b9dmyq4r8z0cwmo3jdl8hs',
name: 'active',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: now,
},
],
indexes: [
{
id: 'g6jzlu2034flxv2pvqst3vh2a',
name: 'idx_fk_store_id',
unique: false,
fieldIds: ['23qg97erb8vs00z89pu6z1kev'],
createdAt: now,
},
{
id: 'x0hvbp0z7mx3qbey90349klw5',
name: 'customer_pkey',
unique: true,
fieldIds: ['2byrkawoomwtfbo4hlm2dw74y'],
createdAt: now,
},
{
id: 'gw5twqlrlipawh54y1qhrwu0t',
name: 'idx_last_name',
unique: false,
fieldIds: ['k0sm6rxdzmkm1tthrih0jl67r'],
createdAt: now,
},
{
id: 'y41qm3l12hg85bz7thb9idryr',
name: 'idx_fk_address_id',
unique: false,
fieldIds: ['ehadwyrqcmt3ozy9ub8kkacqm'],
createdAt: now,
},
],
color: '#4dee8a',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'sx03o3sop41zzvwyp7c9nvvcx',
name: 'inventory',
x: 728.7383049766354,
y: 215.390313450282,
fields: [
{
id: 'ihkfowcflwh43vmfvzhcs4qsh',
name: 'inventory_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
default:
"nextval('inventory_inventory_id_seq'::regclass)",
createdAt: now,
},
{
id: 'tmqm0lbjejydyxk9qxkekv2dx',
name: 'film_id',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: 'ooufm6yrgludnem7q1unx17cl',
name: 'store_id',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: '9z1v71tmjjknvfjrbdlsv094o',
name: 'last_update',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: false,
default: 'now()',
createdAt: now,
},
],
indexes: [
{
id: 'gl1ce4681253ocizlnahzyfyz',
name: 'idx_store_id_film_id',
unique: false,
fieldIds: ['ooufm6yrgludnem7q1unx17cl'],
createdAt: now,
},
{
id: 'q47y9k6y4guzaq9r6iweq12dg',
name: 'idx_store_id_film_id',
unique: false,
fieldIds: ['tmqm0lbjejydyxk9qxkekv2dx'],
createdAt: now,
},
{
id: 'b0brn24lmh4egvojlndc9s78g',
name: 'inventory_pkey',
unique: true,
fieldIds: ['ihkfowcflwh43vmfvzhcs4qsh'],
createdAt: now,
},
],
color: '#9ef07a',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'yj5zet1lfo6kodxnzl9r3lgtp',
name: 'city',
x: -561.4063228067535,
y: 894.3656386061484,
fields: [
{
id: '5of6crq34x0x6wlvcmdgv5zw7',
name: 'city_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
default: "nextval('city_city_id_seq'::regclass)",
createdAt: now,
},
{
id: 'mrul1c7akzacuvc3s41xxego4',
name: 'city',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: false,
nullable: false,
characterMaximumLength: '50',
createdAt: now,
},
{
id: 'u4aj9xveey1eufmczzg0sts25',
name: 'country_id',
type: {
id: 'smallint',
name: 'smallint',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: now,
},
{
id: '3fugxuir9obeda1zhp6ueg4lm',
name: 'last_update',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: false,
default: 'now()',
createdAt: now,
},
],
indexes: [
{
id: 'ce0r4zmj1u78812ffc2gcmyko',
name: 'idx_fk_country_id',
unique: false,
fieldIds: ['u4aj9xveey1eufmczzg0sts25'],
createdAt: now,
},
{
id: '43zd73gkf5vbrp290a2aqibc9',
name: 'city_pkey',
unique: true,
fieldIds: ['5of6crq34x0x6wlvcmdgv5zw7'],
createdAt: now,
},
],
color: '#ff6363',
isView: false,
isMaterializedView: false,
createdAt: now,
},
{
id: 'ymyqg33rfrw2l23mgd35989wz',
name: 'language',
x: 746.4181562673502,
y: 1117.9725006616545,
fields: [
{
id: '8g961c9q8b5zl1hlq48qfk8x9',
name: 'language_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
default:
"nextval('language_language_id_seq'::regclass)",
createdAt: now,
},
{
id: 'htlvmgtuj7aidj4nidgwm4oyw',
name: 'name',
type: {
id: 'char',
name: 'char',
},
primaryKey: false,
unique: false,
nullable: false,
characterMaximumLength: '20',
createdAt: now,
},
{
id: 'r0bukq1f2dstufz2t9p8odwv2',
name: 'last_update',
type: {
id: 'timestamp_without_time_zone',
name: 'timestamp without time zone',
},
primaryKey: false,
unique: false,
nullable: false,
default: 'now()',
createdAt: now,
},
],
indexes: [
{
id: '2yvt9rr3a9j9e4exb9mj2bitv',
name: 'language_pkey',
unique: true,
fieldIds: ['8g961c9q8b5zl1hlq48qfk8x9'],
createdAt: now,
},
],
color: '#8eb7ff',
isView: false,
isMaterializedView: false,
createdAt: now,
},
],
relationships: [
{
id: '07lvs12q3i1tfnydwk944p0u5',
name: 'customer_address_id_fkey',
sourceTableId: 'obr7mfhfjejqleyt42xu6dkbv',
targetTableId: 'ea4vdndmk0mzj37pxmnbnng6x',
sourceFieldId: 'ehadwyrqcmt3ozy9ub8kkacqm',
targetFieldId: 'i6qxuuf9xst3t7rc699nc0hgq',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: '0xduhcrf47uz6k0gcy98qubzj',
name: 'rental_customer_id_fkey',
sourceTableId: 'mcqn81zhg4ldxsgwzn81phmjk',
targetTableId: 'obr7mfhfjejqleyt42xu6dkbv',
sourceFieldId: 'zkl4gi93pago9skvmx0o0scyg',
targetFieldId: '2byrkawoomwtfbo4hlm2dw74y',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: '1ce0w0r8s0xss9lwwayi6v9g0',
name: 'staff_address_id_fkey',
sourceTableId: '34yt1qc2aa0ry1xlfff635xpi',
targetTableId: 'ea4vdndmk0mzj37pxmnbnng6x',
sourceFieldId: 'uhl87fgu2gxu18c7jj7a9lnz4',
targetFieldId: 'i6qxuuf9xst3t7rc699nc0hgq',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: '1tyx62292uu38o0rrcdxv5cz3',
name: 'rental_inventory_id_fkey',
sourceTableId: 'mcqn81zhg4ldxsgwzn81phmjk',
targetTableId: 'sx03o3sop41zzvwyp7c9nvvcx',
sourceFieldId: '4lyxh63o5h60t7fvtuoqjfx4e',
targetFieldId: 'ihkfowcflwh43vmfvzhcs4qsh',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: '2xoeoui3dnqef8a53pjurk44c',
name: 'film_actor_film_id_fkey',
sourceTableId: 'btxa10fqejctzsz9y22z93dto',
targetTableId: 'ernqqm8aiy3d8k2ljq35h1vwx',
sourceFieldId: 'mes2rjjt47i1qj8qgy9xtt2sd',
targetFieldId: '66dmeakl4z56mljzwgvttodic',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: '4j1sobeu97gyvtrqutka6dyon',
name: 'inventory_film_id_fkey',
sourceTableId: 'sx03o3sop41zzvwyp7c9nvvcx',
targetTableId: 'ernqqm8aiy3d8k2ljq35h1vwx',
sourceFieldId: 'tmqm0lbjejydyxk9qxkekv2dx',
targetFieldId: '66dmeakl4z56mljzwgvttodic',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'avuni33tj1mlx3px80cg73mxn',
name: 'film_category_film_id_fkey',
sourceTableId: '3xlkv9xztz29x0bgrw5nrzf3t',
targetTableId: 'ernqqm8aiy3d8k2ljq35h1vwx',
sourceFieldId: '0y1h3uwzkcyyaeesbyr7uiam2',
targetFieldId: '66dmeakl4z56mljzwgvttodic',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'bpdb5n83jwgvql3rsgekkgsuu',
name: 'film_language_id_fkey',
sourceTableId: 'ernqqm8aiy3d8k2ljq35h1vwx',
targetTableId: 'ymyqg33rfrw2l23mgd35989wz',
sourceFieldId: '84sf02yyd4hdvz4d01knzbmhk',
targetFieldId: '8g961c9q8b5zl1hlq48qfk8x9',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'hy4dh9omcw7ge0hiag53dfbcm',
name: 'store_address_id_fkey',
sourceTableId: 'gdc1jbkuk641tmanu26hfjxoh',
targetTableId: 'ea4vdndmk0mzj37pxmnbnng6x',
sourceFieldId: '3l9vxu3klgfvivy3y3q1i7koy',
targetFieldId: 'i6qxuuf9xst3t7rc699nc0hgq',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'illm3w5xrqvntl2m80w32gn6m',
name: 'store_manager_staff_id_fkey',
sourceTableId: 'gdc1jbkuk641tmanu26hfjxoh',
targetTableId: '34yt1qc2aa0ry1xlfff635xpi',
sourceFieldId: 'xeczjzu6ebvm0spupgnesobej',
targetFieldId: '54i12h4z3uodcr72i1qcfr3ks',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'l6s3646egw5ws6r0zpvi8i3kx',
name: 'payment_staff_id_fkey',
sourceTableId: 'g3ge7o85psagng9zan1qvntvf',
targetTableId: '34yt1qc2aa0ry1xlfff635xpi',
sourceFieldId: 'c12w8mec49kzhdf00dbyl4ctd',
targetFieldId: '54i12h4z3uodcr72i1qcfr3ks',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'p8lnkek3oou1rpk52heqplcom',
name: 'film_actor_actor_id_fkey',
sourceTableId: 'btxa10fqejctzsz9y22z93dto',
targetTableId: 'm03oodyufvp9uxjir3uti70r6',
sourceFieldId: 'qv45deuvh3ztz277pnptifai5',
targetFieldId: 'begg7si6me1l1svr3zv27rfp3',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'r5yf6wn7zxp2sovglszw8dfwk',
name: 'fk_city',
sourceTableId: 'yj5zet1lfo6kodxnzl9r3lgtp',
targetTableId: 'cq7xhw34n8yos6oo6j0ri8lqq',
sourceFieldId: 'u4aj9xveey1eufmczzg0sts25',
targetFieldId: 'x773jd75qcqg9ajiyl29bjggo',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'sn93vjerzvmusnju9leasxgof',
name: 'rental_staff_id_key',
sourceTableId: 'mcqn81zhg4ldxsgwzn81phmjk',
targetTableId: '34yt1qc2aa0ry1xlfff635xpi',
sourceFieldId: 'gsw8sdyuej7dt34a29bysv9fr',
targetFieldId: '54i12h4z3uodcr72i1qcfr3ks',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'sx8j3nwiik8qn5bf19oo9d514',
name: 'fk_address_city',
sourceTableId: 'ea4vdndmk0mzj37pxmnbnng6x',
targetTableId: 'yj5zet1lfo6kodxnzl9r3lgtp',
sourceFieldId: 'jfavtmtso40cwyhe09f7i1753',
targetFieldId: '5of6crq34x0x6wlvcmdgv5zw7',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'u7o5ymikjzcgxln3xzgkg9p6w',
name: 'payment_rental_id_fkey',
sourceTableId: 'g3ge7o85psagng9zan1qvntvf',
targetTableId: 'mcqn81zhg4ldxsgwzn81phmjk',
sourceFieldId: 'i37y99hzrq9z3nafghimp6q3a',
targetFieldId: 'fmlmaurapjll9ebz7o54jtpr2',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'ubx3xzrrq58ue4tl113qxnn1x',
name: 'payment_customer_id_fkey',
sourceTableId: 'g3ge7o85psagng9zan1qvntvf',
targetTableId: 'obr7mfhfjejqleyt42xu6dkbv',
sourceFieldId: 't15r74n6x4xrbwlhvsnajn5mu',
targetFieldId: '2byrkawoomwtfbo4hlm2dw74y',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
{
id: 'yx1hlqjfzo7gd5xx82me2ksf2',
name: 'film_category_category_id_fkey',
sourceTableId: '3xlkv9xztz29x0bgrw5nrzf3t',
targetTableId: 'noowyg71ra2jdqmpzongal8k6',
sourceFieldId: 'rt6bj37fpip85o17q505xeras',
targetFieldId: 'grbcz03z7xihwarkidet47sou',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: now,
},
],
dependencies: [],
areas: [
{
id: '996x6m588q0qvl0ow8jnrerkm',
name: 'Actor',
x: -67.76213714534502,
y: 380.7908074634159,
width: 691,
height: 271,
color: '#ff9f74',
},
{
id: 'ilc86f56ejdsrmm0c35e0dnm1',
name: 'Store info',
x: -1194.6006424844563,
y: -285.0279668920198,
width: 726,
height: 626,
color: '#42e0c0',
},
{
id: 'mbr3xr9cifsmeziyiqfx1wpqe',
name: 'Film',
x: -39.20505509904933,
y: 686.5810977471396,
width: 1031,
height: 667,
color: '#8eb7ff',
},
{
id: 'qxwjfn8vxznjxhh0d0omiffvm',
name: 'Locations',
x: -720.9201952020898,
y: 376.84504502140646,
width: 610,
height: 759,
color: '#c05dcf',
},
{
id: 'ri8uegrx440a6kaqemmqsvv2p',
name: 'Rental',
x: 1.746300547304088,
y: -331.9341056404298,
width: 495,
height: 681,
color: '#b067e9',
},
],
},
},
];