MCPcopy Create free account
hub / github.com/SeaQL/sea-orm / create_metadata_table

Function create_metadata_table

tests/common/features/schema.rs:107–131  ·  view source on GitHub ↗
(db: &DbConn)

Source from the content-addressed store, hash-verified

105}
106
107pub async fn create_metadata_table(db: &DbConn) -> Result<ExecResult, DbErr> {
108 let stmt = sea_query::Table::create()
109 .table(metadata::Entity)
110 .col(
111 ColumnDef::new(metadata::Column::Uuid)
112 .uuid()
113 .not_null()
114 .primary_key(),
115 )
116 .col(ColumnDef::new(metadata::Column::Type).string().not_null())
117 .col(ColumnDef::new(metadata::Column::Key).string().not_null())
118 .col(ColumnDef::new(metadata::Column::Value).string().not_null())
119 .col(
120 ColumnDef::new_with_type(
121 metadata::Column::Bytes,
122 ColumnType::VarBinary(StringLen::N(32)),
123 )
124 .not_null(),
125 )
126 .col(ColumnDef::new(metadata::Column::Date).date())
127 .col(ColumnDef::new(metadata::Column::Time).time())
128 .to_owned();
129
130 create_table(db, &stmt, Metadata).await
131}
132
133pub async fn create_repository_table(db: &DbConn) -> Result<ExecResult, DbErr> {
134 let stmt = sea_query::Table::create()

Callers 1

create_tablesFunction · 0.85

Calls 3

createFunction · 0.50
newFunction · 0.50
create_tableFunction · 0.50

Tested by

no test coverage detected