File: 9_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 (11 lines) | stat: -rw-r--r-- 491 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
# message add a document type id to text table
alter table DocTexts add column docTypeId int after docType; 

# message populate the doc type id column in docTexts
update DocTexts set docTypeId=( SELECT docTypeID FROM DocTypes WHERE name=docType ); 

# message create a type column for the docposition 
alter table docposition add column postype VARCHAR(64) AFTER text;

# message create type column for the archdocpos table
alter table archdocpos add column postype VARCHAR(64) AFTER kind;