mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-30 11:48:26 -07:00
added better db migration support than what Subsonic provides out of the box.
This commit is contained in:
parent
180da4c82a
commit
ce63f05512
91 changed files with 7218 additions and 48 deletions
44
Migrator.net/Migrator.Providers/Impl/SQLite/SQLiteDialect.cs
Normal file
44
Migrator.net/Migrator.Providers/Impl/SQLite/SQLiteDialect.cs
Normal file
|
@ -0,0 +1,44 @@
|
|||
|
||||
using System;
|
||||
using System.Data;
|
||||
using Migrator.Framework;
|
||||
|
||||
namespace Migrator.Providers.SQLite
|
||||
{
|
||||
public class SQLiteDialect : Dialect
|
||||
{
|
||||
public SQLiteDialect()
|
||||
{
|
||||
RegisterColumnType(DbType.Binary, "BLOB");
|
||||
RegisterColumnType(DbType.Byte, "INTEGER");
|
||||
RegisterColumnType(DbType.Int16, "INTEGER");
|
||||
RegisterColumnType(DbType.Int32, "INTEGER");
|
||||
RegisterColumnType(DbType.Int64, "INTEGER");
|
||||
RegisterColumnType(DbType.SByte, "INTEGER");
|
||||
RegisterColumnType(DbType.UInt16, "INTEGER");
|
||||
RegisterColumnType(DbType.UInt32, "INTEGER");
|
||||
RegisterColumnType(DbType.UInt64, "INTEGER");
|
||||
RegisterColumnType(DbType.Currency, "NUMERIC");
|
||||
RegisterColumnType(DbType.Decimal, "NUMERIC");
|
||||
RegisterColumnType(DbType.Double, "NUMERIC");
|
||||
RegisterColumnType(DbType.Single, "NUMERIC");
|
||||
RegisterColumnType(DbType.VarNumeric, "NUMERIC");
|
||||
RegisterColumnType(DbType.String, "TEXT");
|
||||
RegisterColumnType(DbType.AnsiStringFixedLength, "TEXT");
|
||||
RegisterColumnType(DbType.StringFixedLength, "TEXT");
|
||||
RegisterColumnType(DbType.DateTime, "DATETIME");
|
||||
RegisterColumnType(DbType.Time, "DATETIME");
|
||||
RegisterColumnType(DbType.Boolean, "INTEGER");
|
||||
RegisterColumnType(DbType.Guid, "UNIQUEIDENTIFIER");
|
||||
|
||||
RegisterProperty(ColumnProperty.Identity, "AUTOINCREMENT");
|
||||
}
|
||||
|
||||
public override Type TransformationProvider { get { return typeof(SQLiteTransformationProvider); } }
|
||||
|
||||
public override bool NeedsNotNullForIdentity
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue