feat(add templates): add six more templates (#452)

* feat(add templates): add six more templates (taggit, orchid, flipper, doorkeeper, canvas, cachet)

* fix build
This commit is contained in:
Jonathan Fishner
2024-11-26 18:07:41 +02:00
committed by GitHub
parent 05eaf85a3d
commit be1b109f23
20 changed files with 6342 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 486 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

View File

@@ -31,6 +31,12 @@ import { feedbinDb } from './templates/feedbin-db';
import { freescoutDb } from './templates/freescout-db'; import { freescoutDb } from './templates/freescout-db';
import { hackerNewsDb } from './templates/hacker-news-db'; import { hackerNewsDb } from './templates/hacker-news-db';
import { flarumDb } from './templates/flarum-db'; import { flarumDb } from './templates/flarum-db';
import { canvasDb } from './templates/canvas-db';
import { taggitDb } from './templates/taggit-db';
import { doorkeeperDb } from './templates/doorkeeper-db';
import { orchidDb } from './templates/orchid-db';
import { flipperDb } from './templates/flipper-db';
import { cachetDb } from './templates/cachet-db';
export interface Template { export interface Template {
slug: string; slug: string;
name: string; name: string;
@@ -77,4 +83,10 @@ export const templates: Template[] = [
freescoutDb, freescoutDb,
hackerNewsDb, hackerNewsDb,
flarumDb, flarumDb,
canvasDb,
taggitDb,
doorkeeperDb,
orchidDb,
flipperDb,
cachetDb,
]; ];

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,584 @@
import { DatabaseType } from '@/lib/domain/database-type';
import type { Template } from '../templates-data';
import image from '@/assets/templates/doorkeeper-db.png';
import imageDark from '@/assets/templates/doorkeeper-db-dark.png';
export const doorkeeperDb: Template = {
slug: 'doorkeeper-database',
name: 'Doorkeeper',
shortDescription: 'Rails OAuth 2 provider',
description: 'Doorkeeper is an OAuth 2 provider for Ruby on Rails / Grape.',
image,
imageDark,
tags: ['MySQL', 'Open Source', 'Rails'],
featured: true,
url: 'https://github.com/doorkeeper-gem/doorkeeper',
diagram: {
id: 'doorkeeper_db',
name: 'doorkeeper-database',
createdAt: new Date(),
updatedAt: new Date(),
databaseType: DatabaseType.MYSQL,
tables: [
{
id: '5s9fctsmmsy96rgwxx22yxv5p',
name: 'oauth_applications',
schema: 't_doorkeeper_db',
x: 100,
y: 100,
fields: [
{
id: '9w3uwcorjanaccb1tljxcris9',
name: 'id',
type: {
id: 'bigint',
name: 'bigint',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: Date.now(),
},
{
id: '8w3g80lo0tw7p3t06b5r9lg2o',
name: 'name',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: false,
unique: false,
nullable: false,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: 'uf3kgxkstwmiuezmvcnj847uj',
name: 'uid',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: false,
unique: true,
nullable: false,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: '5n63c3tsqzdvftkjnkq6i7k39',
name: 'secret',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: false,
unique: false,
nullable: false,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: 'cau4z0n2m8mcli9hx6ed64hyu',
name: 'redirect_uri',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: false,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: 'fbagrcvuk25uzwq5unm991881',
name: 'scopes',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: false,
unique: false,
nullable: false,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: 'urzv1fn66dprx7tww1s0dsef8',
name: 'confidential',
type: {
id: 'tinyint',
name: 'tinyint',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: Date.now(),
},
{
id: 'mi7liyvghjixoawtdkic7ooot',
name: 'created_at',
type: {
id: 'datetime',
name: 'datetime',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: Date.now(),
},
{
id: 'bpuk51a0g725c9m6s6aedabfp',
name: 'updated_at',
type: {
id: 'datetime',
name: 'datetime',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: Date.now(),
},
],
indexes: [
{
id: 'hw3xm9sv6fhy2wvz2orna1e3c',
name: 'oauth_applications_uid_unique',
unique: true,
fieldIds: ['uf3kgxkstwmiuezmvcnj847uj'],
createdAt: Date.now(),
},
{
id: 'ddbuj2dtx28emv9g9jv2inh7c',
name: 'PRIMARY',
unique: true,
fieldIds: ['9w3uwcorjanaccb1tljxcris9'],
createdAt: Date.now(),
},
],
color: '#4dee8a',
isView: false,
isMaterializedView: false,
createdAt: Date.now(),
},
{
id: 'niw9mkgqx819etmpvu63dslic',
name: 'oauth_access_tokens',
schema: 't_doorkeeper_db',
x: 562.4237256719184,
y: -53.88174235403156,
fields: [
{
id: 'rzwnbomoljnap72wvxaht5rjj',
name: 'id',
type: {
id: 'bigint',
name: 'bigint',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: Date.now(),
},
{
id: 'svcycxxruofrbl7ih2f27tl6s',
name: 'resource_owner_id',
type: {
id: 'bigint',
name: 'bigint',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: Date.now(),
},
{
id: 'ue57b6hukq4u6k2jggpdp4j40',
name: 'application_id',
type: {
id: 'bigint',
name: 'bigint',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: Date.now(),
},
{
id: 'gftvctnnukb8hab10vvd4sqz1',
name: 'token',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: false,
unique: true,
nullable: false,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: 'stus1int8xzwz31tdpamnrf3j',
name: 'refresh_token',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: false,
unique: true,
nullable: true,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: 'gc4a8icklv4k715kjo1nfgdqh',
name: 'expires_in',
type: {
id: 'int',
name: 'int',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: Date.now(),
},
{
id: 'bt6g2e2es9autp4s4lsf6o7mw',
name: 'revoked_at',
type: {
id: 'datetime',
name: 'datetime',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: Date.now(),
},
{
id: 'm74coxh0sval57vl85xfhldyx',
name: 'created_at',
type: {
id: 'datetime',
name: 'datetime',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: Date.now(),
},
{
id: 'hs91n9coj97l1agtcvjz3s5g0',
name: 'scopes',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: false,
unique: false,
nullable: true,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: 'mggpvfqw8zig20mh1ozjjkvoo',
name: 'previous_refresh_token',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: false,
unique: false,
nullable: false,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
],
indexes: [
{
id: 'w1y0kvftt0yd0tph3g70onl3w',
name: 'oauth_access_tokens_application_id_index',
unique: false,
fieldIds: ['ue57b6hukq4u6k2jggpdp4j40'],
createdAt: Date.now(),
},
{
id: '2l2mh5fi238cp5ec2kqks3mlq',
name: 'oauth_access_tokens_refresh_token_unique',
unique: true,
fieldIds: ['stus1int8xzwz31tdpamnrf3j'],
createdAt: Date.now(),
},
{
id: 'n9yxzigeawx10z6tc5b1v2qjw',
name: 'oauth_access_tokens_resource_owner_id_index',
unique: false,
fieldIds: ['svcycxxruofrbl7ih2f27tl6s'],
createdAt: Date.now(),
},
{
id: 'y2al3g85a3nm8dfpjvoyy6ub1',
name: 'oauth_access_tokens_token_unique',
unique: true,
fieldIds: ['gftvctnnukb8hab10vvd4sqz1'],
createdAt: Date.now(),
},
{
id: 'q9j0ei3gd01c0agykvrpa9si5',
name: 'PRIMARY',
unique: true,
fieldIds: ['rzwnbomoljnap72wvxaht5rjj'],
createdAt: Date.now(),
},
],
color: '#c05dcf',
isView: false,
isMaterializedView: false,
createdAt: Date.now(),
},
{
id: 'y45hybx72gu835y6me5xkxf3l',
name: 'users',
schema: 't_doorkeeper_db',
x: 920.3240037071362,
y: 278.5608897126969,
fields: [
{
id: 'zwnnses125v9idekkxtvbsh1k',
name: 'id',
type: {
id: 'bigint',
name: 'bigint',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: Date.now(),
},
],
indexes: [
{
id: 'qnb9vqcrl10cuucbvgbxpwrql',
name: 'PRIMARY',
unique: true,
fieldIds: ['zwnnses125v9idekkxtvbsh1k'],
createdAt: Date.now(),
},
],
color: '#ffe374',
isView: false,
isMaterializedView: false,
createdAt: Date.now(),
},
{
id: 'zl0f5zdujwq39p02yiun3swnx',
name: 'oauth_access_grants',
schema: 't_doorkeeper_db',
x: 442.0367006487488,
y: 400.5049119555143,
fields: [
{
id: '0dc4bf0xklltcexsnudn87858',
name: 'id',
type: {
id: 'bigint',
name: 'bigint',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: Date.now(),
},
{
id: 'n0dx2nbwesk4f4eayc5fow4rf',
name: 'resource_owner_id',
type: {
id: 'bigint',
name: 'bigint',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: Date.now(),
},
{
id: '3usgqxo8mc0vzf2d59j4c52mq',
name: 'application_id',
type: {
id: 'bigint',
name: 'bigint',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: Date.now(),
},
{
id: 'n9hn8jduqs3fy0iqtirgmsc0u',
name: 'token',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: false,
unique: true,
nullable: false,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: 'v5k2owfedw5bkx2myi5l3n5eh',
name: 'expires_in',
type: {
id: 'int',
name: 'int',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: Date.now(),
},
{
id: 'f9rji11u4corji12t0cn0tz9z',
name: 'redirect_uri',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: false,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: '3dfb97ysllt65qd9azbfeh4ob',
name: 'created_at',
type: {
id: 'datetime',
name: 'datetime',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: Date.now(),
},
{
id: 'zols5jkofvt77wgd18tolgidv',
name: 'revoked_at',
type: {
id: 'datetime',
name: 'datetime',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: Date.now(),
},
{
id: '3nhab9g21hhnslze7pkbaojh8',
name: 'scopes',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: false,
unique: false,
nullable: false,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
],
indexes: [
{
id: 'ldbno34wq68oog6ngy6gtzauu',
name: 'oauth_access_grants_application_id_index',
unique: false,
fieldIds: ['3usgqxo8mc0vzf2d59j4c52mq'],
createdAt: Date.now(),
},
{
id: '4qglx7v8h6pye1qh4e5ibqvyi',
name: 'oauth_access_grants_resource_owner_id_index',
unique: false,
fieldIds: ['n0dx2nbwesk4f4eayc5fow4rf'],
createdAt: Date.now(),
},
{
id: 'krd01ebul7w0z1us7irdcjyry',
name: 'oauth_access_grants_token_unique',
unique: true,
fieldIds: ['n9hn8jduqs3fy0iqtirgmsc0u'],
createdAt: Date.now(),
},
{
id: '6s2ssgczw5qfa0cnh5nk2t6h9',
name: 'PRIMARY',
unique: true,
fieldIds: ['0dc4bf0xklltcexsnudn87858'],
createdAt: Date.now(),
},
],
color: '#ff9f74',
isView: false,
isMaterializedView: false,
createdAt: Date.now(),
},
],
relationships: [
{
id: 'cnv6nm63754yl29dq9w3cbnwg',
name: 'oauth_access_tokens_resource_owner_id_foreign',
sourceSchema: 't_doorkeeper_db',
targetSchema: 't_doorkeeper_db',
sourceTableId: 'niw9mkgqx819etmpvu63dslic',
targetTableId: 'y45hybx72gu835y6me5xkxf3l',
sourceFieldId: 'svcycxxruofrbl7ih2f27tl6s',
targetFieldId: 'zwnnses125v9idekkxtvbsh1k',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: Date.now(),
},
{
id: 'eod8ieflqxcyeoi8xp1rkc6nm',
name: 'oauth_access_grants_resource_owner_id_foreign',
sourceSchema: 't_doorkeeper_db',
targetSchema: 't_doorkeeper_db',
sourceTableId: 'zl0f5zdujwq39p02yiun3swnx',
targetTableId: 'y45hybx72gu835y6me5xkxf3l',
sourceFieldId: 'n0dx2nbwesk4f4eayc5fow4rf',
targetFieldId: 'zwnnses125v9idekkxtvbsh1k',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: Date.now(),
},
{
id: 'nr99xikuvarwxnw5oxh1ahlzk',
name: 'oauth_access_grants_application_id_foreign',
sourceSchema: 't_doorkeeper_db',
targetSchema: 't_doorkeeper_db',
sourceTableId: 'zl0f5zdujwq39p02yiun3swnx',
targetTableId: '5s9fctsmmsy96rgwxx22yxv5p',
sourceFieldId: '3usgqxo8mc0vzf2d59j4c52mq',
targetFieldId: '9w3uwcorjanaccb1tljxcris9',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: Date.now(),
},
{
id: 'rv73p4hzcmpochd0gij75v4c9',
name: 'oauth_access_tokens_application_id_foreign',
sourceSchema: 't_doorkeeper_db',
targetSchema: 't_doorkeeper_db',
sourceTableId: 'niw9mkgqx819etmpvu63dslic',
targetTableId: '5s9fctsmmsy96rgwxx22yxv5p',
sourceFieldId: 'ue57b6hukq4u6k2jggpdp4j40',
targetFieldId: '9w3uwcorjanaccb1tljxcris9',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: Date.now(),
},
],
dependencies: [],
},
};

View File

@@ -14,8 +14,8 @@ export const flarumDb: Template = {
featured: false, featured: false,
url: 'https://flarum.org', url: 'https://flarum.org',
diagram: { diagram: {
id: 'diagramexample27', id: 'flarum_db',
name: 'flarum-db', name: 'flarum-database',
createdAt: new Date(), createdAt: new Date(),
updatedAt: new Date(), updatedAt: new Date(),
databaseType: DatabaseType.POSTGRESQL, databaseType: DatabaseType.POSTGRESQL,

View File

@@ -0,0 +1,213 @@
import { DatabaseType } from '@/lib/domain/database-type';
import type { Template } from '../templates-data';
import image from '@/assets/templates/flipper-db.png';
import imageDark from '@/assets/templates/flipper-db-dark.png';
export const flipperDb: Template = {
slug: 'flipper-database',
name: 'Flipper',
shortDescription: 'Feature flags for Ruby',
description: 'Beautiful, performant feature flags for Ruby and Rails.',
image,
imageDark,
tags: ['MySQL', 'Open Source', 'Rails'],
featured: true,
url: 'https://github.com/flippercloud/flipper',
diagram: {
id: 'flipper_db',
name: 'flipper-database',
createdAt: new Date(),
updatedAt: new Date(),
databaseType: DatabaseType.MYSQL,
tables: [
{
id: 'fm94fes2cxfjjyxf7cop8r6iy',
name: 'flipper_features',
schema: 't_flipper_db',
x: 490.8536539472756,
y: 97.95898875223355,
fields: [
{
id: 'kzvapep4sezv1ehvx9jut4msa',
name: 'id',
type: {
id: 'bigint',
name: 'bigint',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: Date.now(),
},
{
id: 'nhyf4lcb6wavevyf57lf5sgg6',
name: 'key',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: false,
unique: true,
nullable: false,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: 'j767ltyzmrue9da0834y51dm2',
name: 'created_at',
type: {
id: 'datetime',
name: 'datetime',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: Date.now(),
},
{
id: 'jxv356syc9l7pn70o5ypjsvu2',
name: 'updated_at',
type: {
id: 'datetime',
name: 'datetime',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: Date.now(),
},
],
indexes: [
{
id: '171wmmejcsoekydukvqf7f8as',
name: 'flipper_features_key_unique',
unique: true,
fieldIds: ['nhyf4lcb6wavevyf57lf5sgg6'],
createdAt: Date.now(),
},
{
id: '688euilbvac7l4g4td0f4ope0',
name: 'PRIMARY',
unique: true,
fieldIds: ['kzvapep4sezv1ehvx9jut4msa'],
createdAt: Date.now(),
},
],
color: '#8eb7ff',
isView: false,
isMaterializedView: false,
createdAt: Date.now(),
},
{
id: 'k3fi60h438pnhfit52zds2y22',
name: 'flipper_gates',
schema: 't_flipper_db',
x: 189.76629033949916,
y: 100,
fields: [
{
id: 'pqq0xmwknc6byigyseyh8r9q8',
name: 'id',
type: {
id: 'bigint',
name: 'bigint',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: Date.now(),
},
{
id: 'hyk3w9a3cj48338mma85vm4vn',
name: 'feature_key',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: false,
unique: false,
nullable: false,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: 'pss1gs5xz19bm3nbldxq4qgyc',
name: 'key',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: false,
unique: false,
nullable: false,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: 'shzigzjrhv0m3mlb5mvjit3up',
name: 'value',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: false,
unique: false,
nullable: true,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: 'v92wmlsa70mbcgdlz5pz50xx1',
name: 'created_at',
type: {
id: 'datetime',
name: 'datetime',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: Date.now(),
},
{
id: 'atxf546zsrtvq8mzavfc8gm3e',
name: 'updated_at',
type: {
id: 'datetime',
name: 'datetime',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: Date.now(),
},
],
indexes: [
{
id: '1jpbmppoqifibrackarznx19q',
name: 'flipper_gates_feature_key_key_value_unique',
unique: true,
fieldIds: [
'hyk3w9a3cj48338mma85vm4vn',
'pss1gs5xz19bm3nbldxq4qgyc',
'shzigzjrhv0m3mlb5mvjit3up',
],
createdAt: Date.now(),
},
{
id: 'canhlx66b19z1ota9z9l353ou',
name: 'PRIMARY',
unique: true,
fieldIds: ['pqq0xmwknc6byigyseyh8r9q8'],
createdAt: Date.now(),
},
],
color: '#4dee8a',
isView: false,
isMaterializedView: false,
createdAt: Date.now(),
},
],
relationships: [],
dependencies: [],
},
};

View File

@@ -0,0 +1,891 @@
import { DatabaseType } from '@/lib/domain/database-type';
import type { Template } from '../templates-data';
import image from '@/assets/templates/orchid-db.png';
import imageDark from '@/assets/templates/orchid-db-dark.png';
export const orchidDb: Template = {
slug: 'orchid-database',
name: 'Orchid',
shortDescription: 'Back-Office platform',
description:
'A Laravel package of back-office applications, admin/user panels, and dashboards.',
image,
imageDark,
tags: ['Postgres', 'Open Source', 'Laravel', 'PHP'],
featured: false,
url: 'https://drawsql.app/templates/orchid',
diagram: {
id: 'orchid_db',
name: 'orchid-database',
createdAt: new Date(),
updatedAt: new Date(),
databaseType: DatabaseType.MYSQL,
tables: [
{
id: '71fdxo9ncuj7j5h7p6z6p9wnk',
name: 'attachments',
schema: 't_orchid_db',
x: -300,
y: -100,
fields: [
{
id: 'lgqpeo3tbu1ct5pqhaxx55b89',
name: 'id',
type: {
id: 'int',
name: 'int',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: Date.now(),
},
{
id: 'rrbw2jsbum3w6wug0b6hklmwo',
name: 'name',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: false,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: 'g48tjszq4p6el5rhwvyap3tkh',
name: 'original_name',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: false,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: '8okobzkdj9tb5flnm0sfjy3a5',
name: 'mime',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: false,
unique: false,
nullable: false,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: 'mzzwbs0cvccejkdx2k3bxsvdv',
name: 'extension',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: false,
unique: false,
nullable: true,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: 'ln2eh4bgj75a8wxm8tknc7krm',
name: 'size',
type: {
id: 'bigint',
name: 'bigint',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: Date.now(),
},
{
id: '2blffmjau84s7lnnezad60638',
name: 'sort',
type: {
id: 'int',
name: 'int',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: Date.now(),
},
{
id: 'wdlk5dhteq4h0tpt4sg2cwx7l',
name: 'path',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: false,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: 'vmibvvuhrzhzsdim04py8vt4i',
name: 'description',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: 'j2yt3hgfb5m5s25edc5g5p5dg',
name: 'alt',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: 'te2zpzw69y1hhvfeuj2mtm5z5',
name: 'hash',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: true,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: 's4zt7i83jodx4sndx3tzxh3fx',
name: 'disk',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: false,
unique: false,
nullable: false,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: '8zlf2ojsc5d7rboguwayfh5ha',
name: 'user_id',
type: {
id: 'bigint',
name: 'bigint',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: Date.now(),
},
{
id: '5kbdynhu49e7luliyivevxnq6',
name: 'group',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: false,
unique: false,
nullable: true,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: 't2u1d50oxcil6chubqztufibn',
name: 'created_at',
type: {
id: 'timestamp',
name: 'timestamp',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: Date.now(),
},
{
id: 'neh7szkld37h2uphiq5f7uyus',
name: 'updated_at',
type: {
id: 'timestamp',
name: 'timestamp',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: Date.now(),
},
],
indexes: [
{
id: '2a60016w71sw1z4rqmytwdcyv',
name: 'PRIMARY',
unique: true,
fieldIds: ['lgqpeo3tbu1ct5pqhaxx55b89'],
createdAt: Date.now(),
},
],
color: '#7175fa',
isView: false,
isMaterializedView: false,
createdAt: Date.now(),
},
{
id: '9e8wgcnlgadlwq88ab7x42nfw',
name: 'attachmentable',
schema: 't_orchid_db',
x: 81.76538577755491,
y: -137.56299254753986,
fields: [
{
id: 'lze7awwqh7cmfges7j9gss7ld',
name: 'id',
type: {
id: 'int',
name: 'int',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: Date.now(),
},
{
id: 'fv8i1bjy7y9ohds8uo6r9cvjk',
name: 'attachmentable_type',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: false,
unique: false,
nullable: false,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: '0bga9idieaely6byav6lg86vj',
name: 'attachmentable_id',
type: {
id: 'int',
name: 'int',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: Date.now(),
},
{
id: '08vow7auknmbt4vd35dw5sr64',
name: 'attachment_id',
type: {
id: 'int',
name: 'int',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: Date.now(),
},
],
indexes: [
{
id: 'ih5u7wxqgqvtbdd73oflxp4zt',
name: 'attachmentable_attachment_id_index',
unique: false,
fieldIds: ['08vow7auknmbt4vd35dw5sr64'],
createdAt: Date.now(),
},
{
id: 'mx4r0qb2v3hc1n71pbb0lwebh',
name: 'attachmentable_attachmentable_type_attachmentable_id_index',
unique: false,
fieldIds: [
'fv8i1bjy7y9ohds8uo6r9cvjk',
'0bga9idieaely6byav6lg86vj',
],
createdAt: Date.now(),
},
{
id: 'drk9jmopuds3h36hx6sxhdklx',
name: 'PRIMARY',
unique: true,
fieldIds: ['lze7awwqh7cmfges7j9gss7ld'],
createdAt: Date.now(),
},
],
color: '#42e0c0',
isView: false,
isMaterializedView: false,
createdAt: Date.now(),
},
{
id: 'i4ieeqk4511ri623n7vtmjxkg',
name: 'settings',
schema: 't_orchid_db',
x: 400,
y: 600,
fields: [
{
id: 'whig3jtfp4hszl69aeshnz5e4',
name: 'key',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: true,
unique: true,
nullable: false,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: '9hd4t4x8qdorb0zgh5zy7ks45',
name: 'value',
type: {
id: 'json',
name: 'json',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: Date.now(),
},
],
indexes: [
{
id: 'pk0ua9dy2pzhhlvr9jaygjbpx',
name: 'PRIMARY',
unique: true,
fieldIds: ['whig3jtfp4hszl69aeshnz5e4'],
createdAt: Date.now(),
},
],
color: '#42e0c0',
isView: false,
isMaterializedView: false,
createdAt: Date.now(),
},
{
id: 'k027uir0ao6l8fpw7d1ay3qft',
name: 'notifications',
schema: 't_orchid_db',
x: 500,
y: 100,
fields: [
{
id: '01cotfakdw7iunarpuc1eqwnr',
name: 'id',
type: {
id: 'char',
name: 'char',
},
primaryKey: true,
unique: true,
nullable: false,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: 'l1253c6f5nyaajfignk776qnv',
name: 'type',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: false,
unique: false,
nullable: false,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: 'e357s9a7q59z4lj4563k0ov70',
name: 'notifiable_type',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: false,
unique: false,
nullable: false,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: 'hmro9cstbl7pvzyb0ueej38b7',
name: 'notifiable_id',
type: {
id: 'bigint',
name: 'bigint',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: Date.now(),
},
{
id: 'r8jlzknygzkspqwyekdofonjq',
name: 'data',
type: {
id: 'text',
name: 'text',
},
primaryKey: false,
unique: false,
nullable: false,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: 'slwb1sbiid5xuxs8zwtrhgw1c',
name: 'read_at',
type: {
id: 'timestamp',
name: 'timestamp',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: Date.now(),
},
{
id: 'o4rmhz6ze2p1fwzvvmsn0ey4a',
name: 'created_at',
type: {
id: 'timestamp',
name: 'timestamp',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: Date.now(),
},
{
id: '97zmk1w819jwuyvs2sthe1mew',
name: 'updated_at',
type: {
id: 'timestamp',
name: 'timestamp',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: Date.now(),
},
],
indexes: [
{
id: '3xbo7enpv4t1dxbdelfmd606o',
name: 'notifications_notifiable_id_foreign',
unique: false,
fieldIds: ['hmro9cstbl7pvzyb0ueej38b7'],
createdAt: Date.now(),
},
{
id: 'ng4t2jdsmi3lpmkzg6nw7odzk',
name: 'notifications_notifiable_type_notifiable_id_index',
unique: false,
fieldIds: [
'e357s9a7q59z4lj4563k0ov70',
'hmro9cstbl7pvzyb0ueej38b7',
],
createdAt: Date.now(),
},
{
id: 'krsfpt88k3qjdhn6uq778yu0g',
name: 'PRIMARY',
unique: true,
fieldIds: ['01cotfakdw7iunarpuc1eqwnr'],
createdAt: Date.now(),
},
],
color: '#ff6363',
isView: false,
isMaterializedView: false,
createdAt: Date.now(),
},
{
id: 'p3j1u8r3xxv3p3wsqexn7rovb',
name: 'roles',
schema: 't_orchid_db',
x: 100.00000000000003,
y: 550,
fields: [
{
id: 'o4hh7mgjf9ee94is4ynwyo5zj',
name: 'id',
type: {
id: 'int',
name: 'int',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: Date.now(),
},
{
id: '9ukanv6p7mwd4rupjwl3d8hku',
name: 'slug',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: false,
unique: true,
nullable: false,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: 'vm2tdqrqzce99h90umbh05pi1',
name: 'name',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: false,
unique: false,
nullable: false,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: 'w0m3b817zkfsp7las0peu5y2r',
name: 'permissions',
type: {
id: 'json',
name: 'json',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: Date.now(),
},
{
id: 'trnigyvttxywsqy1cqenqyaw6',
name: 'created_at',
type: {
id: 'timestamp',
name: 'timestamp',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: Date.now(),
},
{
id: 'gpx1i0t8e6hwqf3nnlgl7rtw6',
name: 'updated_at',
type: {
id: 'timestamp',
name: 'timestamp',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: Date.now(),
},
],
indexes: [
{
id: 'zyx6khmt3g9pd3vev5bpjo4yh',
name: 'PRIMARY',
unique: true,
fieldIds: ['o4hh7mgjf9ee94is4ynwyo5zj'],
createdAt: Date.now(),
},
{
id: 'qcr373xl5gjq2rothmvoajo2a',
name: 'roles_slug_unique',
unique: true,
fieldIds: ['9ukanv6p7mwd4rupjwl3d8hku'],
createdAt: Date.now(),
},
],
color: '#b067e9',
isView: false,
isMaterializedView: false,
createdAt: Date.now(),
},
{
id: 'wwy772ru0zkg4ljct6pjwl91s',
name: 'role_users',
schema: 't_orchid_db',
x: -320,
y: 420,
fields: [
{
id: 'iuwqr7fw84fgxarlqkmq2bnh3',
name: 'user_id',
type: {
id: 'bigint',
name: 'bigint',
},
primaryKey: true,
unique: false,
nullable: false,
createdAt: Date.now(),
},
{
id: 'vyqpj645b1dc0txxmhyc5ie23',
name: 'role_id',
type: {
id: 'int',
name: 'int',
},
primaryKey: true,
unique: false,
nullable: false,
createdAt: Date.now(),
},
],
indexes: [
{
id: 'xx8ukrey4gim3jwfs56zfeicg',
name: 'PRIMARY',
unique: true,
fieldIds: [
'iuwqr7fw84fgxarlqkmq2bnh3',
'vyqpj645b1dc0txxmhyc5ie23',
],
createdAt: Date.now(),
},
{
id: 't344ymg5cjfiny4p39i9vwh3x',
name: 'role_users_role_id_index',
unique: false,
fieldIds: ['vyqpj645b1dc0txxmhyc5ie23'],
createdAt: Date.now(),
},
],
color: '#b067e9',
isView: false,
isMaterializedView: false,
createdAt: Date.now(),
},
{
id: 'ydbfacxlwhodoy9nnzbkdkf0g',
name: 'users',
schema: 't_orchid_db',
x: 100,
y: 100,
fields: [
{
id: 'o1n4ty6ymyi41gbfhcqwppa3p',
name: 'id',
type: {
id: 'bigint',
name: 'bigint',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: Date.now(),
},
{
id: 'kmea6u19ghgwduvtgkh05tgoq',
name: 'name',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: false,
unique: false,
nullable: false,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: 'ozi31o0p9ow8epliom949x01e',
name: 'email',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: false,
unique: true,
nullable: false,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: 'o24szb7w4t8ngzzwzgmito21m',
name: 'email_verified_at',
type: {
id: 'timestamp',
name: 'timestamp',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: Date.now(),
},
{
id: '6kdn1ktgx3wv8tv5nnmeapypg',
name: 'password',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: false,
unique: false,
nullable: false,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: 'u16gkd45jpwec0cc9uiky7622',
name: 'remember_token',
type: {
id: 'varchar',
name: 'varchar',
},
primaryKey: false,
unique: false,
nullable: true,
collation: 'utf8mb4_0900_ai_ci',
createdAt: Date.now(),
},
{
id: 'u36wia3c8hjb1yww5dv86rn21',
name: 'created_at',
type: {
id: 'timestamp',
name: 'timestamp',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: Date.now(),
},
{
id: 'e18csiyrk41qa9xlninw797re',
name: 'updated_at',
type: {
id: 'timestamp',
name: 'timestamp',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: Date.now(),
},
{
id: '9k4lt1xa7dps1sajhcncr4j5k',
name: 'last_login',
type: {
id: 'timestamp',
name: 'timestamp',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: Date.now(),
},
{
id: 'i00i6og4e1xk0bb1s005ovg3r',
name: 'permissions',
type: {
id: 'json',
name: 'json',
},
primaryKey: false,
unique: false,
nullable: true,
createdAt: Date.now(),
},
],
indexes: [
{
id: 'mj4rijed0zqbtmvh51lnw5bau',
name: 'PRIMARY',
unique: true,
fieldIds: ['o1n4ty6ymyi41gbfhcqwppa3p'],
createdAt: Date.now(),
},
{
id: 'qwygfkmk6e8fz6emzeyk4bmay',
name: 'users_email_unique',
unique: true,
fieldIds: ['ozi31o0p9ow8epliom949x01e'],
createdAt: Date.now(),
},
],
color: '#42e0c0',
isView: false,
isMaterializedView: false,
createdAt: Date.now(),
},
],
relationships: [
{
id: 'dbrx24i66861hxrwxaba3jaee',
name: 'attachmentable_attachment_id_foreign',
sourceSchema: 't_orchid_db',
targetSchema: 't_orchid_db',
sourceTableId: '9e8wgcnlgadlwq88ab7x42nfw',
targetTableId: '71fdxo9ncuj7j5h7p6z6p9wnk',
sourceFieldId: '08vow7auknmbt4vd35dw5sr64',
targetFieldId: 'lgqpeo3tbu1ct5pqhaxx55b89',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: Date.now(),
},
{
id: 'ehglrbddna888qzcrhz0u9zxm',
name: 'role_users_user_id_foreign',
sourceSchema: 't_orchid_db',
targetSchema: 't_orchid_db',
sourceTableId: 'wwy772ru0zkg4ljct6pjwl91s',
targetTableId: 'ydbfacxlwhodoy9nnzbkdkf0g',
sourceFieldId: 'iuwqr7fw84fgxarlqkmq2bnh3',
targetFieldId: 'o1n4ty6ymyi41gbfhcqwppa3p',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: Date.now(),
},
{
id: 'qynjlszbi8qiflgjvbvd6pkjc',
name: 'notifications_notifiable_id_foreign',
sourceSchema: 't_orchid_db',
targetSchema: 't_orchid_db',
sourceTableId: 'k027uir0ao6l8fpw7d1ay3qft',
targetTableId: 'ydbfacxlwhodoy9nnzbkdkf0g',
sourceFieldId: 'hmro9cstbl7pvzyb0ueej38b7',
targetFieldId: 'o1n4ty6ymyi41gbfhcqwppa3p',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: Date.now(),
},
{
id: 'x3inmacyjmf8y1mvq2j1w6phd',
name: 'role_users_role_id_foreign',
sourceSchema: 't_orchid_db',
targetSchema: 't_orchid_db',
sourceTableId: 'wwy772ru0zkg4ljct6pjwl91s',
targetTableId: 'p3j1u8r3xxv3p3wsqexn7rovb',
sourceFieldId: 'vyqpj645b1dc0txxmhyc5ie23',
targetFieldId: 'o4hh7mgjf9ee94is4ynwyo5zj',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: Date.now(),
},
],
dependencies: [],
},
};

View File

@@ -0,0 +1,198 @@
import { DatabaseType } from '@/lib/domain/database-type';
import type { Template } from '../templates-data';
import image from '@/assets/templates/taggit-db.png';
import imageDark from '@/assets/templates/taggit-db-dark.png';
export const taggitDb: Template = {
slug: 'taggit-database',
name: 'Taggit',
shortDescription: 'Simple tagging for django',
description:
'Django-taggit adds simple tagging to Django models via TaggableManager, perfect for content categorization.',
image,
imageDark,
tags: ['Postgres', 'Python', 'Django'],
featured: true,
url: 'https://github.com/jazzband/django-taggit',
diagram: {
id: 'taggit_db',
name: 'taggit-database',
createdAt: new Date(),
updatedAt: new Date(),
databaseType: DatabaseType.POSTGRESQL,
tables: [
{
id: '0holubg8i1uulaw3lic1rygkx',
name: 'taggit_taggeditem',
schema: 'public',
x: 500,
y: 100,
fields: [
{
id: 'ltcc5pkb4ooq63foi63gdtb3c',
name: 'id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: Date.now(),
},
{
id: 'pup36l9w97keiae4vfw56igsb',
name: 'tag_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: Date.now(),
},
{
id: '19dp43bm6ux6lus333j9sny6x',
name: 'content_type_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: Date.now(),
},
{
id: 'w9yfpzpeupxjgzw65o4zf04qf',
name: 'object_id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: false,
unique: false,
nullable: false,
createdAt: Date.now(),
},
],
indexes: [
{
id: '3sxkkcnm9lvfx6l3sc30rq147',
name: 'taggit_taggeditem_object_id_index',
unique: false,
fieldIds: ['w9yfpzpeupxjgzw65o4zf04qf'],
createdAt: Date.now(),
},
{
id: '0jvg6v0k20rgw3mbonj70mine',
name: 'taggit_taggeditem_tag_id_index',
unique: false,
fieldIds: ['pup36l9w97keiae4vfw56igsb'],
createdAt: Date.now(),
},
{
id: 'l0zz5xoktlxbyeit6jlne9ao2',
name: 'taggit_taggeditem_pkey',
unique: true,
fieldIds: ['ltcc5pkb4ooq63foi63gdtb3c'],
createdAt: Date.now(),
},
],
color: '#42e0c0',
isView: false,
isMaterializedView: false,
createdAt: Date.now(),
},
{
id: 'y07r6qa7swxs31geu6evcyaor',
name: 'taggit_tag',
schema: 'public',
x: 100,
y: 100,
fields: [
{
id: 'yqa1ei8zqjiere7ism4x161by',
name: 'id',
type: {
id: 'integer',
name: 'integer',
},
primaryKey: true,
unique: true,
nullable: false,
createdAt: Date.now(),
},
{
id: 'z3ybcuhf577pxfxprhbio3376',
name: 'name',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: true,
nullable: false,
createdAt: Date.now(),
},
{
id: 'bqigt5quu06yv8m8ocb6acp81',
name: 'slug',
type: {
id: 'character_varying',
name: 'character varying',
},
primaryKey: false,
unique: true,
nullable: false,
createdAt: Date.now(),
},
],
indexes: [
{
id: 'wfcg2lyomssv39fllfdfs8yqy',
name: 'taggit_tag_slug_unique',
unique: true,
fieldIds: ['bqigt5quu06yv8m8ocb6acp81'],
createdAt: Date.now(),
},
{
id: 'cta41zix0hvmckn4opnr3f960',
name: 'taggit_tag_name_unique',
unique: true,
fieldIds: ['z3ybcuhf577pxfxprhbio3376'],
createdAt: Date.now(),
},
{
id: '32fplxrl5adx6fj9m8e718fvm',
name: 'taggit_tag_pkey',
unique: true,
fieldIds: ['yqa1ei8zqjiere7ism4x161by'],
createdAt: Date.now(),
},
],
color: '#42e0c0',
isView: false,
isMaterializedView: false,
createdAt: Date.now(),
},
],
relationships: [
{
id: '6lmfxfk9n2acc4f9pb32ywbnj',
name: 'taggit_taggeditem_tag_id_foreign',
sourceSchema: 'public',
targetSchema: 'public',
sourceTableId: '0holubg8i1uulaw3lic1rygkx',
targetTableId: 'y07r6qa7swxs31geu6evcyaor',
sourceFieldId: 'pup36l9w97keiae4vfw56igsb',
targetFieldId: 'yqa1ei8zqjiere7ism4x161by',
sourceCardinality: 'many',
targetCardinality: 'one',
createdAt: Date.now(),
},
],
dependencies: [],
},
};