mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-10-20 10:44:05 +08:00
!60 Improve table operation fault tolerance
Merge pull request !60 from Jane/master
This commit is contained in:
@@ -62,7 +62,7 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return "ALTER TABLE {0} ADD COLUMN {1} {2}{3}";
|
return "ALTER TABLE {0} ADD COLUMN IF NOT EXISTS {1} {2}{3}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
protected override string AlterColumnToTableSql
|
protected override string AlterColumnToTableSql
|
||||||
@@ -84,7 +84,7 @@ namespace SqlSugar
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return "CREATE TABLE {0}(\r\n{1} $PrimaryKey )";
|
return "CREATE TABLE IF NOT EXISTS {0}(\r\n{1} $PrimaryKey )";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
protected override string CreateTableColumn
|
protected override string CreateTableColumn
|
||||||
|
Reference in New Issue
Block a user