Skip to content

Database diagrams editor that allows you to visualize and design your DB with a single query.

11.9 KB
Raw Blame
import { DatabaseType } from '@/lib/domain/database-type';
import type { Template } from '../templates-data';
import image from '@/assets/templates/laravel-db.png';
import imageDark from '@/assets/templates/laravel-db-dark.png';

const now = Date.now();

export const laravelDb: Template = {
    slug: 'laravel-database',
    name: 'Laravel',
    shortDescription: 'PHP web framework',
    description:
        'With elegant syntax, simplifying web development by streamlining common tasks across projects',
    image,
    imageDark,
    tags: ['Postgres', 'Open Source', 'Laravel', 'PHP'],
    featured: true,
    url: 'https://github.com/laravel/laravel',
    diagram: {
        id: 'laravel_db',
        name: 'laravel-database',
        createdAt: new Date(),
        updatedAt: new Date(),
        databaseType: DatabaseType.POSTGRESQL,
        tables: [
            {
                id: 'tzwvz1wtn84fny03tzl1sl0ho',
                name: 'failed_jobs',
                schema: 'public',
                x: 737.7682179548738,
                y: 139.69501050040327,
                fields: [
                    {
                        id: 'stybn7gf7n84qhv3kizvxz13p',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        default: "nextval('failed_jobs_id_seq'::regclass)",
                        createdAt: now,
                    },
                    {
                        id: '9fyo2qdmsglsw7ctthmzlep1j',
                        name: 'connection',
                        type: {
                            id: 'text',
                            name: 'text',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'ut52fvqjpa0u27jd2t6t92tom',
                        name: 'queue',
                        type: {
                            id: 'text',
                            name: 'text',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'plvfv0t9im2km2v0a0qzt8udo',
                        name: 'payload',
                        type: {
                            id: 'text',
                            name: 'text',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'g5ef3gfi72xw0xeb0x6ox4b7r',
                        name: 'exception',
                        type: {
                            id: 'text',
                            name: 'text',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'ez9j04lvylcn570ne77xjsbta',
                        name: 'failed_at',
                        type: {
                            id: 'timestamp_with_time_zone',
                            name: 'timestamp with time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: 'ht83plkt884y1myetskx9redz',
                        name: 'idx_failed_jobs_failed_at',
                        unique: false,
                        fieldIds: ['ez9j04lvylcn570ne77xjsbta'],
                        createdAt: now,
                    },
                    {
                        id: 'ztnvgd4m167ut9473h1kiofge',
                        name: 'failed_jobs_pkey',
                        unique: true,
                        fieldIds: ['stybn7gf7n84qhv3kizvxz13p'],
                        createdAt: now,
                    },
                ],
                color: '#ffe374',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: 'ytrk4k6ihrm2fhkodz3t2ovzb',
                name: 'migrations',
                schema: 'public',
                x: 146.59849058742998,
                y: 208.72981137066984,
                fields: [
                    {
                        id: 'uldhz9mhxosp9dqfmmpvabzta',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        default: "nextval('migrations_id_seq'::regclass)",
                        createdAt: now,
                    },
                    {
                        id: 'wjccp1hwlalr87ct56q35mf11',
                        name: 'migration',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'jomrea7wdjx21q2510vyxz0y7',
                        name: 'batch',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: 'tbyc6yvknlhyff4pw6ideqnde',
                        name: 'migrations_pkey',
                        unique: true,
                        fieldIds: ['uldhz9mhxosp9dqfmmpvabzta'],
                        createdAt: now,
                    },
                ],
                color: '#4dee8a',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
            {
                id: 'yw7xlj5rjjevf292enea0qbgv',
                name: 'users',
                schema: 'public',
                x: 422.62737943432694,
                y: -112.94222230620639,
                fields: [
                    {
                        id: '79ny0my0rv9ztzg7ww735rmrj',
                        name: 'id',
                        type: {
                            id: 'integer',
                            name: 'integer',
                        },
                        primaryKey: true,
                        unique: true,
                        nullable: false,
                        default: "nextval('users_id_seq'::regclass)",
                        createdAt: now,
                    },
                    {
                        id: 'lzzou36zm6l6r4vmizdf24q8x',
                        name: 'name',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'lh4oc6cam3kb161f1thohs95j',
                        name: 'email',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: true,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'luulms1e4cbai05978ufc0xdi',
                        name: 'email_verified_at',
                        type: {
                            id: 'timestamp_with_time_zone',
                            name: 'timestamp with time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: 'xai5t98b0syebn21hkdvcf6sg',
                        name: 'password',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: false,
                        createdAt: now,
                    },
                    {
                        id: 'b93oi649bi053g51mfobb94mq',
                        name: 'remember_token',
                        type: {
                            id: 'character_varying',
                            name: 'character varying',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: '76dz2udxcbudh5c8sdmauwsas',
                        name: 'created_at',
                        type: {
                            id: 'timestamp_with_time_zone',
                            name: 'timestamp with time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                    {
                        id: '267qdi3o75bdg9lsf5wuhku9s',
                        name: 'updated_at',
                        type: {
                            id: 'timestamp_with_time_zone',
                            name: 'timestamp with time zone',
                        },
                        primaryKey: false,
                        unique: false,
                        nullable: true,
                        createdAt: now,
                    },
                ],
                indexes: [
                    {
                        id: 'uc19mnyl8xllnfjoaz3qkesi5',
                        name: 'idx_users_email',
                        unique: false,
                        fieldIds: ['lh4oc6cam3kb161f1thohs95j'],
                        createdAt: now,
                    },
                    {
                        id: 'tgx4fsgm3j6q793g7ttfdr8em',
                        name: 'users_email_key',
                        unique: true,
                        fieldIds: ['lh4oc6cam3kb161f1thohs95j'],
                        createdAt: now,
                    },
                    {
                        id: 'kmp3sogww6j7lovhrv25dolxp',
                        name: 'users_pkey',
                        unique: true,
                        fieldIds: ['79ny0my0rv9ztzg7ww735rmrj'],
                        createdAt: now,
                    },
                ],
                color: '#ff6b8a',
                isView: false,
                isMaterializedView: false,
                createdAt: now,
            },
        ],
        relationships: [],
        dependencies: [],
    },
};