File: 23_dbmigrate.sql

package info (click to toggle)
kraft 2.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,112 kB
  • sloc: cpp: 28,535; sql: 1,248; perl: 396; xml: 330; python: 101; sh: 92; makefile: 10
file content (16 lines) | stat: -rw-r--r-- 460 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
ALTER TABLE stockMaterial ADD COLUMN sortKey INT default 0;

CREATE TABLE catItemUsage (
  catId  INT NOT NULL,
  itemId INT NOT NULL,
  usageCount INT default 0,
  lastUsed DATETIME,

  PRIMARY KEY(catId, itemId)
);

-- These statements are only supported starting from 3.35
-- https://sqlite.org/changes.html#version_3_35_0
-- rather disabled for now for robustness
-- ALTER TABLE Catalog DROP COLUMN lastUsed;
-- ALTER TABLE Catalog DROP COLUMN useCounter;