mirror of
https://github.com/nitnelave/lldap.git
synced 2023-04-12 14:25:13 +00:00
Migrate deprecated create_if_not_exists
This commit is contained in:
parent
f8951d3b82
commit
d771293a43
@ -40,7 +40,7 @@ pub async fn init_table(pool: &Pool) -> sqlx::Result<()> {
|
|||||||
sqlx::query(
|
sqlx::query(
|
||||||
&Table::create()
|
&Table::create()
|
||||||
.table(Users::Table)
|
.table(Users::Table)
|
||||||
.create_if_not_exists()
|
.if_not_exists()
|
||||||
.col(
|
.col(
|
||||||
ColumnDef::new(Users::UserId)
|
ColumnDef::new(Users::UserId)
|
||||||
.string_len(255)
|
.string_len(255)
|
||||||
@ -67,7 +67,7 @@ pub async fn init_table(pool: &Pool) -> sqlx::Result<()> {
|
|||||||
sqlx::query(
|
sqlx::query(
|
||||||
&Table::create()
|
&Table::create()
|
||||||
.table(Groups::Table)
|
.table(Groups::Table)
|
||||||
.create_if_not_exists()
|
.if_not_exists()
|
||||||
.col(
|
.col(
|
||||||
ColumnDef::new(Groups::GroupId)
|
ColumnDef::new(Groups::GroupId)
|
||||||
.integer()
|
.integer()
|
||||||
@ -86,7 +86,7 @@ pub async fn init_table(pool: &Pool) -> sqlx::Result<()> {
|
|||||||
sqlx::query(
|
sqlx::query(
|
||||||
&Table::create()
|
&Table::create()
|
||||||
.table(Memberships::Table)
|
.table(Memberships::Table)
|
||||||
.create_if_not_exists()
|
.if_not_exists()
|
||||||
.col(
|
.col(
|
||||||
ColumnDef::new(Memberships::UserId)
|
ColumnDef::new(Memberships::UserId)
|
||||||
.string_len(255)
|
.string_len(255)
|
||||||
|
Loading…
Reference in New Issue
Block a user