Init
This commit is contained in:
@@ -28,7 +28,19 @@ impl MigrationTrait for Migration {
|
||||
.default(Expr::current_timestamp()),
|
||||
)
|
||||
.col(
|
||||
ColumnDef::new(Alias::new("default_permissions"))
|
||||
ColumnDef::new(Alias::new("default_server_permissions"))
|
||||
.big_integer()
|
||||
.not_null()
|
||||
.default(0),
|
||||
)
|
||||
.col(
|
||||
ColumnDef::new(Alias::new("default_channel_permissions"))
|
||||
.big_integer()
|
||||
.not_null()
|
||||
.default(0),
|
||||
)
|
||||
.col(
|
||||
ColumnDef::new(Alias::new("default_voice_permissions"))
|
||||
.big_integer()
|
||||
.not_null()
|
||||
.default(0),
|
||||
@@ -120,11 +132,6 @@ impl MigrationTrait for Migration {
|
||||
.not_null()
|
||||
.default(Expr::current_timestamp()),
|
||||
)
|
||||
.col(
|
||||
ColumnDef::new(Alias::new("default_permissions"))
|
||||
.big_integer()
|
||||
.null(),
|
||||
)
|
||||
// Indexes créés après
|
||||
.foreign_key(
|
||||
ForeignKey::create()
|
||||
@@ -317,7 +324,19 @@ impl MigrationTrait for Migration {
|
||||
.default(false),
|
||||
)
|
||||
.col(
|
||||
ColumnDef::new(Alias::new("permissions"))
|
||||
ColumnDef::new(Alias::new("server_permissions"))
|
||||
.big_integer()
|
||||
.not_null()
|
||||
.default(0),
|
||||
)
|
||||
.col(
|
||||
ColumnDef::new(Alias::new("channel_permissions"))
|
||||
.big_integer()
|
||||
.not_null()
|
||||
.default(0),
|
||||
)
|
||||
.col(
|
||||
ColumnDef::new(Alias::new("voice_permissions"))
|
||||
.big_integer()
|
||||
.not_null()
|
||||
.default(0),
|
||||
@@ -361,12 +380,6 @@ impl MigrationTrait for Migration {
|
||||
.not_null()
|
||||
.default("member".to_owned()),
|
||||
)
|
||||
.col(
|
||||
ColumnDef::new(Alias::new("permissions"))
|
||||
.big_integer()
|
||||
.not_null()
|
||||
.default(0),
|
||||
)
|
||||
.col(
|
||||
ColumnDef::new(Alias::new("joined_at"))
|
||||
.timestamp_with_time_zone()
|
||||
@@ -553,7 +566,19 @@ impl MigrationTrait for Migration {
|
||||
.col(ColumnDef::new("server_id").uuid().not_null())
|
||||
.col(ColumnDef::new("name").string().not_null())
|
||||
.col(
|
||||
ColumnDef::new("permissions")
|
||||
ColumnDef::new(Alias::new("server_permissions"))
|
||||
.big_integer()
|
||||
.not_null()
|
||||
.default(0),
|
||||
)
|
||||
.col(
|
||||
ColumnDef::new(Alias::new("channel_permissions"))
|
||||
.big_integer()
|
||||
.not_null()
|
||||
.default(0),
|
||||
)
|
||||
.col(
|
||||
ColumnDef::new(Alias::new("voice_permissions"))
|
||||
.big_integer()
|
||||
.not_null()
|
||||
.default(0),
|
||||
@@ -570,6 +595,12 @@ impl MigrationTrait for Migration {
|
||||
.not_null()
|
||||
.default(Expr::current_timestamp()),
|
||||
)
|
||||
.col(
|
||||
ColumnDef::new("edited_at")
|
||||
.timestamp_with_time_zone()
|
||||
.null()
|
||||
.default(Expr::current_timestamp()),
|
||||
)
|
||||
.foreign_key(
|
||||
ForeignKey::create()
|
||||
.name("fk_group_server")
|
||||
|
||||
Reference in New Issue
Block a user