233 lines
7.3 KiB
TypeScript
233 lines
7.3 KiB
TypeScript
import type { BUN_MARIADB_DatabaseSchemaType } from "@moduletrace/bun-mariadb";
|
|
|
|
const schema: BUN_MARIADB_DatabaseSchemaType = {
|
|
tables: [
|
|
{
|
|
tableName: "blog_posts",
|
|
fields: [
|
|
{
|
|
fieldName: "id",
|
|
dataType: "BIGINT",
|
|
primaryKey: true,
|
|
autoIncrement: true,
|
|
notNullValue: true,
|
|
},
|
|
{
|
|
fieldName: "title",
|
|
dataType: "VARCHAR",
|
|
notNullValue: true,
|
|
},
|
|
{
|
|
fieldName: "slug",
|
|
dataType: "VARCHAR",
|
|
notNullValue: true,
|
|
},
|
|
{
|
|
fieldName: "excerpt",
|
|
dataType: "TEXT",
|
|
},
|
|
{
|
|
fieldName: "body",
|
|
dataType: "LONGTEXT",
|
|
markdown: true,
|
|
},
|
|
{
|
|
json: true,
|
|
fieldName: "metadata",
|
|
dataType: "TEXT",
|
|
nullValue: true,
|
|
},
|
|
{
|
|
dataType: "BOOLEAN",
|
|
fieldName: "published",
|
|
defaultValue: "0",
|
|
},
|
|
{
|
|
dataType: "VARCHAR",
|
|
fieldName: "meta_title",
|
|
},
|
|
{
|
|
dataType: "TEXT",
|
|
fieldName: "meta_description",
|
|
},
|
|
{
|
|
fieldName: "date_created",
|
|
dataType: "VARCHAR",
|
|
notNullValue: true,
|
|
},
|
|
{
|
|
fieldName: "date_created_code",
|
|
dataType: "BIGINT",
|
|
notNullValue: true,
|
|
},
|
|
{
|
|
fieldName: "date_created_timestamp",
|
|
dataType: "TIMESTAMP",
|
|
defaultValueLiteral: "CURRENT_TIMESTAMP",
|
|
nullValue: true,
|
|
},
|
|
{
|
|
fieldName: "date_updated",
|
|
dataType: "VARCHAR",
|
|
notNullValue: true,
|
|
},
|
|
{
|
|
fieldName: "date_updated_code",
|
|
dataType: "BIGINT",
|
|
notNullValue: true,
|
|
},
|
|
{
|
|
fieldName: "date_updated_timestamp",
|
|
dataType: "TIMESTAMP",
|
|
defaultValueLiteral: "CURRENT_TIMESTAMP",
|
|
nullValue: true,
|
|
},
|
|
],
|
|
indexes: [],
|
|
uniqueConstraints: [],
|
|
},
|
|
{
|
|
tableName: "portfolio",
|
|
fields: [
|
|
{
|
|
fieldName: "id",
|
|
dataType: "BIGINT",
|
|
primaryKey: true,
|
|
autoIncrement: true,
|
|
notNullValue: true,
|
|
},
|
|
{
|
|
fieldName: "title",
|
|
dataType: "VARCHAR",
|
|
notNullValue: true,
|
|
},
|
|
{
|
|
fieldName: "description",
|
|
dataType: "VARCHAR",
|
|
nullValue: true,
|
|
},
|
|
{
|
|
fieldName: "url",
|
|
dataType: "VARCHAR",
|
|
nullValue: true,
|
|
},
|
|
{
|
|
fieldName: "image",
|
|
dataType: "VARCHAR",
|
|
nullValue: true,
|
|
},
|
|
{
|
|
fieldName: "full_description",
|
|
dataType: "LONGTEXT",
|
|
nullValue: true,
|
|
html: true,
|
|
},
|
|
{
|
|
fieldName: "starting_date",
|
|
dataType: "VARCHAR",
|
|
nullValue: true,
|
|
},
|
|
{
|
|
fieldName: "completion_date",
|
|
dataType: "VARCHAR",
|
|
nullValue: true,
|
|
},
|
|
{
|
|
fieldName: "project_order",
|
|
dataType: "INT",
|
|
},
|
|
{
|
|
fieldName: "date_created",
|
|
dataType: "VARCHAR",
|
|
notNullValue: true,
|
|
},
|
|
{
|
|
fieldName: "date_created_code",
|
|
dataType: "BIGINT",
|
|
notNullValue: true,
|
|
},
|
|
{
|
|
fieldName: "date_created_timestamp",
|
|
dataType: "TIMESTAMP",
|
|
defaultValueLiteral: "CURRENT_TIMESTAMP",
|
|
nullValue: true,
|
|
},
|
|
{
|
|
fieldName: "date_updated",
|
|
dataType: "VARCHAR",
|
|
notNullValue: true,
|
|
},
|
|
{
|
|
fieldName: "date_updated_code",
|
|
dataType: "BIGINT",
|
|
notNullValue: true,
|
|
},
|
|
{
|
|
fieldName: "date_updated_timestamp",
|
|
dataType: "TIMESTAMP",
|
|
defaultValueLiteral: "CURRENT_TIMESTAMP",
|
|
nullValue: true,
|
|
},
|
|
],
|
|
indexes: [],
|
|
},
|
|
{
|
|
tableName: "documents",
|
|
fields: [
|
|
{
|
|
fieldName: "id",
|
|
dataType: "BIGINT",
|
|
primaryKey: true,
|
|
autoIncrement: true,
|
|
notNullValue: true,
|
|
},
|
|
{
|
|
fieldName: "project_name",
|
|
dataType: "VARCHAR",
|
|
notNullValue: true,
|
|
},
|
|
{
|
|
fieldName: "html",
|
|
dataType: "LONGTEXT",
|
|
html: true,
|
|
cssFiles: [],
|
|
},
|
|
{
|
|
fieldName: "date_created",
|
|
dataType: "VARCHAR",
|
|
notNullValue: true,
|
|
},
|
|
{
|
|
fieldName: "date_created_code",
|
|
dataType: "BIGINT",
|
|
notNullValue: true,
|
|
},
|
|
{
|
|
fieldName: "date_created_timestamp",
|
|
dataType: "TIMESTAMP",
|
|
defaultValueLiteral: "CURRENT_TIMESTAMP",
|
|
nullValue: true,
|
|
},
|
|
{
|
|
fieldName: "date_updated",
|
|
dataType: "VARCHAR",
|
|
notNullValue: true,
|
|
},
|
|
{
|
|
fieldName: "date_updated_code",
|
|
dataType: "BIGINT",
|
|
notNullValue: true,
|
|
},
|
|
{
|
|
fieldName: "date_updated_timestamp",
|
|
dataType: "TIMESTAMP",
|
|
defaultValueLiteral: "CURRENT_TIMESTAMP",
|
|
nullValue: true,
|
|
},
|
|
],
|
|
},
|
|
],
|
|
};
|
|
|
|
export default schema;
|