SQL

CREATE TABLE "local_device_production_points"  (
  "Id" TEXT NOT NULL CONSTRAINT "PK_local_device_production_points" PRIMARY KEY,
  "DeviceId" TEXT NOT NULL,
  "ProductionPointId" TEXT NOT NULL,
  "SortOrder" INTEGER NOT NULL,
  "CreatedAt" TEXT NOT NULL,
  "UpdatedAt" TEXT NOT NULL,
  "IsDeleted" INTEGER NOT NULL,
  "DeletedAt" TEXT NULL
)

+ Add column

Columns

Column Data type Allow null Primary key Actions
Id TEXT Rename | Drop
DeviceId TEXT Rename | Drop
ProductionPointId TEXT Rename | Drop
SortOrder INTEGER Rename | Drop
CreatedAt TEXT Rename | Drop
UpdatedAt TEXT Rename | Drop
IsDeleted INTEGER Rename | Drop
DeletedAt TEXT Rename | Drop

+ Add index

Indexes

Name Columns Unique SQL Drop?
IX_local_device_production_points_DeviceId_ProductionPointId
  • DeviceId
  • ProductionPointId
SQL
CREATE UNIQUE INDEX "IX_local_device_production_points_DeviceId_ProductionPointId"
ON "local_device_production_points" ("DeviceId", "ProductionPointId")
Drop
IX_local_device_production_points_ProductionPointId ProductionPointId SQL
CREATE INDEX "IX_local_device_production_points_ProductionPointId"
ON "local_device_production_points" ("ProductionPointId")
Drop
sqlite_autoindex_local_device_production_points_1 Id SQL
-- no sql found --
Drop