home page improved
This commit is contained in:
@@ -33,8 +33,17 @@ impl MigrationTrait for Migration {
|
||||
Table::create()
|
||||
.table(BlogArticles::Table)
|
||||
.if_not_exists()
|
||||
.col(ColumnDef::new(BlogArticles::Id).uuid().not_null().primary_key())
|
||||
.col(ColumnDef::new(BlogArticles::Title).string_len(500).not_null())
|
||||
.col(
|
||||
ColumnDef::new(BlogArticles::Id)
|
||||
.uuid()
|
||||
.not_null()
|
||||
.primary_key(),
|
||||
)
|
||||
.col(
|
||||
ColumnDef::new(BlogArticles::Title)
|
||||
.string_len(500)
|
||||
.not_null(),
|
||||
)
|
||||
.col(
|
||||
ColumnDef::new(BlogArticles::Slug)
|
||||
.string_len(500)
|
||||
@@ -42,7 +51,11 @@ impl MigrationTrait for Migration {
|
||||
.unique_key(),
|
||||
)
|
||||
.col(ColumnDef::new(BlogArticles::Content).text().not_null())
|
||||
.col(ColumnDef::new(BlogArticles::Excerpt).string_len(1000).null())
|
||||
.col(
|
||||
ColumnDef::new(BlogArticles::Excerpt)
|
||||
.string_len(1000)
|
||||
.null(),
|
||||
)
|
||||
.col(
|
||||
ColumnDef::new(BlogArticles::Published)
|
||||
.boolean()
|
||||
|
||||
@@ -30,7 +30,12 @@ impl MigrationTrait for Migration {
|
||||
Table::create()
|
||||
.table(AuditLogs::Table)
|
||||
.if_not_exists()
|
||||
.col(ColumnDef::new(AuditLogs::Id).uuid().not_null().primary_key())
|
||||
.col(
|
||||
ColumnDef::new(AuditLogs::Id)
|
||||
.uuid()
|
||||
.not_null()
|
||||
.primary_key(),
|
||||
)
|
||||
.col(ColumnDef::new(AuditLogs::AdminUserId).integer().not_null())
|
||||
.col(ColumnDef::new(AuditLogs::Action).string_len(100).not_null())
|
||||
.col(ColumnDef::new(AuditLogs::TargetType).string_len(50).null())
|
||||
|
||||
@@ -34,8 +34,17 @@ impl MigrationTrait for Migration {
|
||||
Table::create()
|
||||
.table(AudioAlbums::Table)
|
||||
.if_not_exists()
|
||||
.col(ColumnDef::new(AudioAlbums::Id).uuid().not_null().primary_key())
|
||||
.col(ColumnDef::new(AudioAlbums::Title).string_len(500).not_null())
|
||||
.col(
|
||||
ColumnDef::new(AudioAlbums::Id)
|
||||
.uuid()
|
||||
.not_null()
|
||||
.primary_key(),
|
||||
)
|
||||
.col(
|
||||
ColumnDef::new(AudioAlbums::Title)
|
||||
.string_len(500)
|
||||
.not_null(),
|
||||
)
|
||||
.col(
|
||||
ColumnDef::new(AudioAlbums::Slug)
|
||||
.string_len(500)
|
||||
|
||||
@@ -32,9 +32,18 @@ impl MigrationTrait for Migration {
|
||||
Table::create()
|
||||
.table(AudioTracks::Table)
|
||||
.if_not_exists()
|
||||
.col(ColumnDef::new(AudioTracks::Id).uuid().not_null().primary_key())
|
||||
.col(
|
||||
ColumnDef::new(AudioTracks::Id)
|
||||
.uuid()
|
||||
.not_null()
|
||||
.primary_key(),
|
||||
)
|
||||
.col(ColumnDef::new(AudioTracks::AlbumId).uuid().not_null())
|
||||
.col(ColumnDef::new(AudioTracks::Title).string_len(500).not_null())
|
||||
.col(
|
||||
ColumnDef::new(AudioTracks::Title)
|
||||
.string_len(500)
|
||||
.not_null(),
|
||||
)
|
||||
.col(ColumnDef::new(AudioTracks::Slug).string_len(500).not_null())
|
||||
.col(
|
||||
ColumnDef::new(AudioTracks::AudioFileId)
|
||||
|
||||
@@ -19,7 +19,12 @@ impl MigrationTrait for Migration {
|
||||
Table::create()
|
||||
.table(AudioTags::Table)
|
||||
.if_not_exists()
|
||||
.col(ColumnDef::new(AudioTags::Id).uuid().not_null().primary_key())
|
||||
.col(
|
||||
ColumnDef::new(AudioTags::Id)
|
||||
.uuid()
|
||||
.not_null()
|
||||
.primary_key(),
|
||||
)
|
||||
.col(
|
||||
ColumnDef::new(AudioTags::Name)
|
||||
.string_len(100)
|
||||
|
||||
@@ -21,7 +21,12 @@ impl MigrationTrait for Migration {
|
||||
Table::create()
|
||||
.table(SitePages::Table)
|
||||
.if_not_exists()
|
||||
.col(ColumnDef::new(SitePages::Id).uuid().not_null().primary_key())
|
||||
.col(
|
||||
ColumnDef::new(SitePages::Id)
|
||||
.uuid()
|
||||
.not_null()
|
||||
.primary_key(),
|
||||
)
|
||||
.col(
|
||||
ColumnDef::new(SitePages::Slug)
|
||||
.string_len(100)
|
||||
|
||||
Reference in New Issue
Block a user