   CREATE SEQUENCE  ARCHIVE_AR_ID_SEQ  MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER  NOCYCLE ;




   CREATE SEQUENCE  CATEGORY_CAT_ID_SEQ  MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER  NOCYCLE ;




   CREATE SEQUENCE  EXTERNALLINKS_EL_ID_SEQ  MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 21 CACHE 20 NOORDER  NOCYCLE ;




   CREATE SEQUENCE  FILEARCHIVE_FA_ID_SEQ  MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER  NOCYCLE ;




   CREATE SEQUENCE  IPBLOCKS_IPB_ID_SEQ  MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER  NOCYCLE ;




   CREATE SEQUENCE  JOB_JOB_ID_SEQ  MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER  NOCYCLE ;




   CREATE SEQUENCE  LOGGING_LOG_ID_SEQ  MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER  NOCYCLE ;




   CREATE SEQUENCE  PAGE_PAGE_ID_SEQ  MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 21 CACHE 20 NOORDER  NOCYCLE ;




   CREATE SEQUENCE  PAGE_RESTRICTIONS_PR_ID_SEQ  MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER  NOCYCLE ;




   CREATE SEQUENCE  RECENTCHANGES_RC_ID_SEQ  MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 21 CACHE 20 NOORDER  NOCYCLE ;




   CREATE SEQUENCE  REVISION_REV_ID_SEQ  MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 21 CACHE 20 NOORDER  NOCYCLE ;




   CREATE SEQUENCE  SITES_SITE_ID_SEQ  MINVALUE 0 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 0 CACHE 20 NOORDER  NOCYCLE ;




   CREATE SEQUENCE  TEXT_OLD_ID_SEQ  MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 21 CACHE 20 NOORDER  NOCYCLE ;




   CREATE SEQUENCE  UPLOADSTASH_US_ID_SEQ  MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER  NOCYCLE ;




   CREATE SEQUENCE  USER_USER_ID_SEQ  MINVALUE 1 MAXVALUE 9999999999999999999999999999 INCREMENT BY 1 START WITH 21 CACHE 20 NOORDER  NOCYCLE ;




  CREATE TABLE MWARCHIVE 
   (    AR_ID NUMBER, 
	AR_NAMESPACE NUMBER , 
	AR_TITLE VARCHAR2(255), 
	AR_TEXT VARCHAR2(255), 
	AR_COMMENT VARCHAR2(255), 
	AR_USER NUMBER , 
	AR_USER_TEXT VARCHAR2(255), 
	AR_TIMESTAMP VARCHAR2(255), 
	AR_MINOR_EDIT VARCHAR2(1) , 
	AR_FLAGS VARCHAR2(255), 
	AR_REV_ID NUMBER, 
	AR_TEXT_ID NUMBER, 
	AR_DELETED VARCHAR2(1) , 
	AR_LEN NUMBER, 
	AR_PAGE_ID NUMBER, 
	AR_PARENT_ID NUMBER, 
	AR_SHA1 VARCHAR2(32), 
	AR_CONTENT_MODEL VARCHAR2(32), 
	AR_CONTENT_FORMAT VARCHAR2(64)
   ) ;




  CREATE TABLE MWCATEGORY 
   (	CAT_ID NUMBER, 
	CAT_TITLE VARCHAR2(255), 
	CAT_PAGES NUMBER , 
	CAT_SUBCATS NUMBER , 
	CAT_FILES NUMBER
   ) ;




  CREATE TABLE MWCATEGORYLINKS 
   (	CL_FROM NUMBER, 
	CL_TO VARCHAR2(255), 
	CL_SORTKEY VARCHAR2(230), 
	CL_SORTKEY_PREFIX VARCHAR2(255), 
	CL_TIMESTAMP VARCHAR2(255), 
	CL_COLLATION VARCHAR2(32), 
	CL_TYPE VARCHAR2(6)
   ) ;




  CREATE TABLE MWCHANGE_TAG 
   (	CT_RC_ID NUMBER, 
	CT_LOG_ID NUMBER, 
	CT_REV_ID NUMBER, 
	CT_TAG VARCHAR2(255), 
	CT_PARAMS  VARCHAR2(255)
   ) ;




  CREATE TABLE MWEXTERNALLINKS 
   (	EL_ID NUMBER, 
	EL_FROM NUMBER, 
	EL_TO VARCHAR2(2048), 
	EL_INDEX VARCHAR2(2048)
   ) ;




  CREATE TABLE MWFILEARCHIVE 
   (	FA_ID NUMBER, 
	FA_NAME VARCHAR2(255), 
	FA_ARCHIVE_NAME VARCHAR2(255), 
	FA_STORAGE_GROUP VARCHAR2(16), 
	FA_STORAGE_KEY VARCHAR2(64), 
	FA_DELETED_USER NUMBER , 
	FA_DELETED_TIMESTAMP VARCHAR2(255), 
	FA_DELETED_REASON VARCHAR2(255), 
	FA_SIZE NUMBER , 
	FA_WIDTH NUMBER , 
	FA_HEIGHT NUMBER , 
	FA_METADATA VARCHAR2(255), 
	FA_BITS NUMBER , 
	FA_MEDIA_TYPE VARCHAR2(32) , 
	FA_MAJOR_MIME VARCHAR2(32) , 
	FA_MINOR_MIME VARCHAR2(100) , 
	FA_DESCRIPTION VARCHAR2(255), 
	FA_USER NUMBER , 
	FA_USER_TEXT VARCHAR2(255), 
	FA_TIMESTAMP VARCHAR2(255), 
	FA_DELETED NUMBER , 
	FA_SHA1 VARCHAR2(32)
   ) ;




  CREATE TABLE MWHITCOUNTER 
   (	HC_ID NUMBER
   ) ;




  CREATE TABLE MWIMAGE 
   (	IMG_NAME VARCHAR2(255), 
	IMG_SIZE NUMBER , 
	IMG_WIDTH NUMBER , 
	IMG_HEIGHT NUMBER , 
	IMG_METADATA VARCHAR2(255), 
	IMG_BITS NUMBER , 
	IMG_MEDIA_TYPE VARCHAR2(32), 
	IMG_MAJOR_MIME VARCHAR2(32) , 
	IMG_MINOR_MIME VARCHAR2(100) , 
	IMG_DESCRIPTION VARCHAR2(255), 
	IMG_USER NUMBER , 
	IMG_USER_TEXT VARCHAR2(255), 
	IMG_TIMESTAMP VARCHAR2(255), 
	IMG_SHA1 VARCHAR2(32)
   ) ;




  CREATE TABLE MWIMAGELINKS 
   (	IL_FROM NUMBER, 
	IL_TO VARCHAR2(255)
   ) ;




  CREATE TABLE MWINTERWIKI 
   (	IW_PREFIX VARCHAR2(32), 
	IW_URL VARCHAR2(127), 
	IW_API VARCHAR2(255), 
	IW_WIKIID VARCHAR2(64), 
	IW_LOCAL VARCHAR2(1), 
	IW_TRANS VARCHAR2(1)
   ) ;




  CREATE TABLE MWIPBLOCKS 
   (	IPB_ID NUMBER, 
	IPB_ADDRESS VARCHAR2(255), 
	IPB_USER NUMBER , 
	IPB_BY NUMBER , 
	IPB_BY_TEXT VARCHAR2(255), 
	IPB_REASON VARCHAR2(255), 
	IPB_TIMESTAMP VARCHAR2(255), 
	IPB_AUTO VARCHAR2(1) , 
	IPB_ANON_ONLY VARCHAR2(1) , 
	IPB_CREATE_ACCOUNT VARCHAR2(1) , 
	IPB_ENABLE_AUTOBLOCK VARCHAR2(1) , 
	IPB_EXPIRY VARCHAR2(255), 
	IPB_RANGE_START VARCHAR2(255), 
	IPB_RANGE_END VARCHAR2(255), 
	IPB_DELETED VARCHAR2(1) , 
	IPB_BLOCK_EMAIL VARCHAR2(1) , 
	IPB_ALLOW_USERTALK VARCHAR2(1) , 
	IPB_PARENT_BLOCK_ID NUMBER
   ) ;




  CREATE TABLE MWIWLINKS 
   (	IWL_FROM NUMBER , 
	IWL_PREFIX VARCHAR2(20), 
	IWL_TITLE VARCHAR2(255)
   ) ;




  CREATE TABLE MWJOB 
   (	JOB_ID NUMBER, 
	JOB_CMD VARCHAR2(60), 
	JOB_NAMESPACE NUMBER , 
	JOB_TITLE VARCHAR2(255), 
	JOB_TIMESTAMP VARCHAR2(255), 
	JOB_PARAMS VARCHAR2(255), 
	JOB_RANDOM NUMBER , 
	JOB_TOKEN VARCHAR2(32), 
	JOB_TOKEN_TIMESTAMP VARCHAR2(255), 
	JOB_SHA1 VARCHAR2(32), 
	JOB_ATTEMPTS NUMBER
   ) ;




  CREATE TABLE MWL10N_CACHE 
   (	LC_LANG VARCHAR2(32), 
	LC_KEY VARCHAR2(255), 
	LC_VALUE  VARCHAR2(255)
   ) ;




  CREATE TABLE MWLANGLINKS 
   (	LL_FROM NUMBER, 
	LL_LANG VARCHAR2(20), 
	LL_TITLE VARCHAR2(255)
   ) ;




  CREATE TABLE MWLOGGING 
   (	LOG_ID NUMBER, 
	LOG_TYPE VARCHAR2(10), 
	LOG_ACTION VARCHAR2(10), 
	LOG_TIMESTAMP VARCHAR2(255), 
	LOG_USER NUMBER , 
	LOG_USER_TEXT VARCHAR2(255), 
	LOG_NAMESPACE NUMBER , 
	LOG_TITLE VARCHAR2(255), 
	LOG_PAGE NUMBER, 
	LOG_COMMENT VARCHAR2(255), 
	LOG_PARAMS VARCHAR2(255), 
	LOG_DELETED VARCHAR2(1)
   ) ;




  CREATE TABLE MWLOG_SEARCH 
   (	LS_FIELD VARCHAR2(32), 
	LS_VALUE VARCHAR2(255), 
	LS_LOG_ID NUMBER
   ) ;




  CREATE TABLE MWMODULE_DEPS 
   (	MD_MODULE VARCHAR2(255), 
	MD_SKIN VARCHAR2(32), 
	MD_DEPS  VARCHAR2(255)
   ) ;




  CREATE TABLE MWMSG_RESOURCE 
   (	MR_RESOURCE VARCHAR2(255), 
	MR_LANG VARCHAR2(32), 
	MR_BLOB VARCHAR2(255), 
	MR_TIMESTAMP VARCHAR2(255)
   ) ;




  CREATE TABLE MWMSG_RESOURCE_LINKS 
   (	MRL_RESOURCE VARCHAR2(255), 
	MRL_MESSAGE VARCHAR2(255)
   ) ;




  CREATE TABLE MWMWUSER 
   (	USER_ID NUMBER, 
	USER_NAME VARCHAR2(255), 
	USER_REAL_NAME VARCHAR2(512), 
	USER_PASSWORD VARCHAR2(255), 
	USER_NEWPASSWORD VARCHAR2(255), 
	USER_NEWPASS_TIME VARCHAR2(255), 
	USER_TOKEN VARCHAR2(32), 
	USER_EMAIL VARCHAR2(255), 
	USER_EMAIL_TOKEN VARCHAR2(32), 
	USER_EMAIL_TOKEN_EXPIRES VARCHAR2(255), 
	USER_EMAIL_AUTHENTICATED VARCHAR2(255), 
	USER_OPTIONS VARCHAR2(255), 
	USER_TOUCHED VARCHAR2(255), 
	USER_REGISTRATION VARCHAR2(255), 
	USER_EDITCOUNT NUMBER, 
	USER_PASSWORD_EXPIRES VARCHAR2(255)
   ) ;




  CREATE TABLE MWOBJECTCACHE 
   (	KEYNAME VARCHAR2(255), 
	VALUE VARCHAR2(255), 
	EXPTIME VARCHAR2(255)
   ) ;




  CREATE TABLE MWOLDIMAGE 
   (	OI_NAME VARCHAR2(255) , 
	OI_ARCHIVE_NAME VARCHAR2(255), 
	OI_SIZE NUMBER , 
	OI_WIDTH NUMBER , 
	OI_HEIGHT NUMBER , 
	OI_BITS NUMBER , 
	OI_DESCRIPTION VARCHAR2(255), 
	OI_USER NUMBER , 
	OI_USER_TEXT VARCHAR2(255), 
	OI_TIMESTAMP VARCHAR2(255), 
	OI_METADATA VARCHAR2(255), 
	OI_MEDIA_TYPE VARCHAR2(32) , 
	OI_MAJOR_MIME VARCHAR2(32) , 
	OI_MINOR_MIME VARCHAR2(100) , 
	OI_DELETED NUMBER , 
	OI_SHA1 VARCHAR2(32)
   ) ;




  CREATE TABLE MWPAGE 
   (	PAGE_ID NUMBER, 
	PAGE_NAMESPACE NUMBER , 
	PAGE_TITLE VARCHAR2(255), 
	PAGE_RESTRICTIONS VARCHAR2(255), 
	PAGE_COUNTER NUMBER , 
	PAGE_IS_REDIRECT VARCHAR2(1) , 
	PAGE_IS_NEW VARCHAR2(1) , 
	PAGE_RANDOM NUMBER, 
	PAGE_TOUCHED VARCHAR2(255), 
	PAGE_LINKS_UPDATED VARCHAR2(255), 
	PAGE_LATEST NUMBER , 
	PAGE_LEN NUMBER , 
	PAGE_CONTENT_MODEL VARCHAR2(32)
   ) ;




  CREATE TABLE MWPAGECONTENT 
   (	OLD_ID NUMBER, 
	OLD_TEXT VARCHAR2(255), 
	OLD_FLAGS VARCHAR2(255)
   ) ;




  CREATE TABLE MWPAGELINKS 
   (	PL_FROM NUMBER, 
	PL_NAMESPACE NUMBER , 
	PL_TITLE VARCHAR2(255)
   ) ;




  CREATE TABLE MWPAGE_PROPS 
   (	PP_PAGE NUMBER, 
	PP_PROPNAME VARCHAR2(60), 
	PP_VALUE  VARCHAR2(255)
   ) ;




  CREATE TABLE MWPAGE_RESTRICTIONS 
   (	PR_ID NUMBER, 
	PR_PAGE NUMBER, 
	PR_TYPE VARCHAR2(255), 
	PR_LEVEL VARCHAR2(255), 
	PR_CASCADE NUMBER, 
	PR_USER NUMBER, 
	PR_EXPIRY VARCHAR2(255)
   ) ;




  CREATE TABLE MWPROTECTED_TITLES 
   (	PT_NAMESPACE NUMBER , 
	PT_TITLE VARCHAR2(255), 
	PT_USER NUMBER, 
	PT_REASON VARCHAR2(255), 
	PT_TIMESTAMP VARCHAR2(255), 
	PT_EXPIRY VARCHAR2(14), 
	PT_CREATE_PERM VARCHAR2(60)
   ) ;




  CREATE TABLE MWQUERYCACHE 
   (	QC_TYPE VARCHAR2(32), 
	QC_VALUE NUMBER , 
	QC_NAMESPACE NUMBER , 
	QC_TITLE VARCHAR2(255)
   ) ;




  CREATE TABLE MWQUERYCACHETWO 
   (	QCC_TYPE VARCHAR2(32), 
	QCC_VALUE NUMBER , 
	QCC_NAMESPACE NUMBER , 
	QCC_TITLE VARCHAR2(255), 
	QCC_NAMESPACETWO NUMBER , 
	QCC_TITLETWO VARCHAR2(255)
   ) ;




  CREATE TABLE MWQUERYCACHE_INFO 
   (	QCI_TYPE VARCHAR2(32), 
	QCI_TIMESTAMP VARCHAR2(255)
   ) ;




  CREATE TABLE MWRECENTCHANGES 
   (	RC_ID NUMBER, 
	RC_TIMESTAMP VARCHAR2(255), 
	RC_CUR_TIME VARCHAR2(255), 
	RC_USER NUMBER , 
	RC_USER_TEXT VARCHAR2(255), 
	RC_NAMESPACE NUMBER , 
	RC_TITLE VARCHAR2(255), 
	RC_COMMENT VARCHAR2(255), 
	RC_MINOR VARCHAR2(1) , 
	RC_BOT VARCHAR2(1) , 
	RC_NEW VARCHAR2(1) , 
	RC_CUR_ID NUMBER , 
	RC_THIS_OLDID NUMBER , 
	RC_LAST_OLDID NUMBER , 
	RC_TYPE VARCHAR2(1) , 
	RC_SOURCE VARCHAR2(16), 
	RC_PATROLLED VARCHAR2(1) , 
	RC_IP VARCHAR2(15), 
	RC_OLD_LEN NUMBER, 
	RC_NEW_LEN NUMBER, 
	RC_DELETED VARCHAR2(1) , 
	RC_LOGID NUMBER , 
	RC_LOG_TYPE VARCHAR2(255), 
	RC_LOG_ACTION VARCHAR2(255), 
	RC_PARAMS  VARCHAR2(255)
   ) ;




  CREATE TABLE MWREDIRECT 
   (	RD_FROM NUMBER, 
	RD_NAMESPACE NUMBER , 
	RD_TITLE VARCHAR2(255), 
	RD_INTERWIKI VARCHAR2(32), 
	RD_FRAGMENT VARCHAR2(255)
   ) ;




  CREATE TABLE MWREVISION 
   (	REV_ID NUMBER, 
	REV_PAGE NUMBER, 
	REV_TEXT_ID NUMBER, 
	REV_COMMENT VARCHAR2(255), 
	REV_USER NUMBER , 
	REV_USER_TEXT VARCHAR2(255), 
	REV_TIMESTAMP VARCHAR2(255), 
	REV_MINOR_EDIT VARCHAR2(1) , 
	REV_DELETED VARCHAR2(1) , 
	REV_LEN NUMBER, 
	REV_PARENT_ID NUMBER , 
	REV_SHA1 VARCHAR2(32), 
	REV_CONTENT_MODEL VARCHAR2(32), 
	REV_CONTENT_FORMAT VARCHAR2(64)
   ) ;




  CREATE TABLE MWSEARCHINDEX 
   (	SI_PAGE NUMBER, 
	SI_TITLE VARCHAR2(255), 
	SI_TEXT  VARCHAR2(255)
   ) ;




  CREATE TABLE MWSITES 
   (	SITE_ID NUMBER, 
	SITE_GLOBAL_KEY VARCHAR2(32), 
	SITE_TYPE VARCHAR2(32), 
	SITE_GROUP VARCHAR2(32), 
	SITE_SOURCE VARCHAR2(32), 
	SITE_LANGUAGE VARCHAR2(32), 
	SITE_PROTOCOL VARCHAR2(32), 
	SITE_DOMAIN VARCHAR2(255), 
	SITE_DATA VARCHAR2(255), 
	SITE_FORWARD NUMBER, 
	SITE_CONFIG  VARCHAR2(255)
   ) ;




  CREATE TABLE MWSITE_IDENTIFIERS 
   (	SI_SITE NUMBER, 
	SI_TYPE VARCHAR2(32), 
	SI_KEY VARCHAR2(32)
   ) ;




  CREATE TABLE MWSITE_STATS 
   (	SS_ROW_ID NUMBER, 
	SS_TOTAL_VIEWS NUMBER , 
	SS_TOTAL_EDITS NUMBER , 
	SS_GOOD_ARTICLES NUMBER , 
	SS_TOTAL_PAGES NUMBER , 
	SS_USERS NUMBER , 
	SS_ACTIVE_USERS NUMBER , 
	SS_IMAGES NUMBER
   ) ;




  CREATE TABLE MWTAG_SUMMARY 
   (	TS_RC_ID NUMBER, 
	TS_LOG_ID NUMBER, 
	TS_REV_ID NUMBER, 
	TS_TAGS  VARCHAR2(255)
   ) ;




  CREATE TABLE MWTEMPLATELINKS 
   (	TL_FROM NUMBER, 
	TL_NAMESPACE NUMBER , 
	TL_TITLE VARCHAR2(255)
   ) ;




  CREATE TABLE MWTRANSCACHE 
   (	TC_URL VARCHAR2(255), 
	TC_CONTENTS VARCHAR2(255), 
	TC_TIME VARCHAR2(255)
   ) ;




  CREATE TABLE MWUPDATELOG 
   (	UL_KEY VARCHAR2(255), 
	UL_VALUE  VARCHAR2(255)
   ) ;




  CREATE TABLE MWUPLOADSTASH 
   (	US_ID NUMBER, 
	US_USER NUMBER , 
	US_KEY VARCHAR2(255), 
	US_ORIG_PATH VARCHAR2(255), 
	US_PATH VARCHAR2(255), 
	US_SOURCE_TYPE VARCHAR2(50), 
	US_TIMESTAMP VARCHAR2(255), 
	US_STATUS VARCHAR2(50), 
	US_CHUNK_INX NUMBER, 
	US_SIZE NUMBER, 
	US_SHA1 VARCHAR2(32), 
	US_MIME VARCHAR2(255), 
	US_MEDIA_TYPE VARCHAR2(32) , 
	US_IMAGE_WIDTH NUMBER, 
	US_IMAGE_HEIGHT NUMBER, 
	US_IMAGE_BITS NUMBER, 
	US_PROPS  VARCHAR2(255)
   ) ;




  CREATE TABLE MWUSER_FORMER_GROUPS 
   (	UFG_USER NUMBER , 
	UFG_GROUP VARCHAR2(255)
   ) ;




  CREATE TABLE MWUSER_GROUPS 
   (	UG_USER NUMBER , 
	UG_GROUP VARCHAR2(255)
   ) ;




  CREATE TABLE MWUSER_NEWTALK 
   (	USER_ID NUMBER , 
	USER_IP VARCHAR2(40), 
	USER_LAST_TIMESTAMP VARCHAR2(255)
   ) ;




  CREATE TABLE MWUSER_PROPERTIES 
   (	UP_USER NUMBER, 
	UP_PROPERTY VARCHAR2(255), 
	UP_VALUE  VARCHAR2(255)
   ) ;




  CREATE TABLE MWVALID_TAG 
   (	VT_TAG VARCHAR2(255)
   ) ;




  CREATE TABLE MWWATCHLIST 
   (	WL_USER NUMBER, 
	WL_NAMESPACE NUMBER , 
	WL_TITLE VARCHAR2(255), 
	WL_NOTIFICATIONTIMESTAMP VARCHAR2(255)
   ) ;







































































































































































































































































































































































































































































































































































































































































































































































   INDEXTYPE IS CTXSYS.CONTEXT ;





   INDEXTYPE IS CTXSYS.CONTEXT ;








































































































































  ALTER TABLE MWARCHIVE ADD CONSTRAINT MWARCHIVE_PK PRIMARY KEY (AR_ID)
  USING INDEX  ENABLE;
  ALTER TABLE MWARCHIVE MODIFY (AR_DELETED NOT NULL ENABLE);
  ALTER TABLE MWARCHIVE MODIFY (AR_MINOR_EDIT NOT NULL ENABLE);
  ALTER TABLE MWARCHIVE MODIFY (AR_TIMESTAMP NOT NULL ENABLE);
  ALTER TABLE MWARCHIVE MODIFY (AR_USER_TEXT NOT NULL ENABLE);
  ALTER TABLE MWARCHIVE MODIFY (AR_USER NOT NULL ENABLE);
  ALTER TABLE MWARCHIVE MODIFY (AR_TITLE NOT NULL ENABLE);
  ALTER TABLE MWARCHIVE MODIFY (AR_NAMESPACE NOT NULL ENABLE);
  ALTER TABLE MWARCHIVE MODIFY (AR_ID NOT NULL ENABLE);




  ALTER TABLE MWCATEGORY ADD CONSTRAINT MWCATEGORY_PK PRIMARY KEY (CAT_ID)
  USING INDEX  ENABLE;
  ALTER TABLE MWCATEGORY MODIFY (CAT_FILES NOT NULL ENABLE);
  ALTER TABLE MWCATEGORY MODIFY (CAT_SUBCATS NOT NULL ENABLE);
  ALTER TABLE MWCATEGORY MODIFY (CAT_PAGES NOT NULL ENABLE);
  ALTER TABLE MWCATEGORY MODIFY (CAT_TITLE NOT NULL ENABLE);
  ALTER TABLE MWCATEGORY MODIFY (CAT_ID NOT NULL ENABLE);




  ALTER TABLE MWCATEGORYLINKS MODIFY (CL_TYPE NOT NULL ENABLE);
  ALTER TABLE MWCATEGORYLINKS MODIFY (CL_TIMESTAMP NOT NULL ENABLE);
  ALTER TABLE MWCATEGORYLINKS MODIFY (CL_TO NOT NULL ENABLE);
  ALTER TABLE MWCATEGORYLINKS MODIFY (CL_FROM NOT NULL ENABLE);




  ALTER TABLE MWCHANGE_TAG MODIFY (CT_TAG NOT NULL ENABLE);




  ALTER TABLE MWEXTERNALLINKS ADD CONSTRAINT MWEXTERNALLINKS_PK PRIMARY KEY (EL_ID)
  USING INDEX  ENABLE;
  ALTER TABLE MWEXTERNALLINKS MODIFY (EL_INDEX NOT NULL ENABLE);
  ALTER TABLE MWEXTERNALLINKS MODIFY (EL_TO NOT NULL ENABLE);
  ALTER TABLE MWEXTERNALLINKS MODIFY (EL_FROM NOT NULL ENABLE);
  ALTER TABLE MWEXTERNALLINKS MODIFY (EL_ID NOT NULL ENABLE);




  ALTER TABLE MWFILEARCHIVE ADD CONSTRAINT MWFILEARCHIVE_PK PRIMARY KEY (FA_ID)
  USING INDEX  ENABLE;
  ALTER TABLE MWFILEARCHIVE MODIFY (FA_DELETED NOT NULL ENABLE);
  ALTER TABLE MWFILEARCHIVE MODIFY (FA_USER_TEXT NOT NULL ENABLE);
  ALTER TABLE MWFILEARCHIVE MODIFY (FA_USER NOT NULL ENABLE);
  ALTER TABLE MWFILEARCHIVE MODIFY (FA_BITS NOT NULL ENABLE);
  ALTER TABLE MWFILEARCHIVE MODIFY (FA_HEIGHT NOT NULL ENABLE);
  ALTER TABLE MWFILEARCHIVE MODIFY (FA_WIDTH NOT NULL ENABLE);
  ALTER TABLE MWFILEARCHIVE MODIFY (FA_SIZE NOT NULL ENABLE);
  ALTER TABLE MWFILEARCHIVE MODIFY (FA_DELETED_TIMESTAMP NOT NULL ENABLE);
  ALTER TABLE MWFILEARCHIVE MODIFY (FA_DELETED_USER NOT NULL ENABLE);
  ALTER TABLE MWFILEARCHIVE MODIFY (FA_NAME NOT NULL ENABLE);
  ALTER TABLE MWFILEARCHIVE MODIFY (FA_ID NOT NULL ENABLE);




  ALTER TABLE MWHITCOUNTER MODIFY (HC_ID NOT NULL ENABLE);




  ALTER TABLE MWIMAGE ADD CONSTRAINT MWIMAGE_PK PRIMARY KEY (IMG_NAME)
  USING INDEX  ENABLE;
  ALTER TABLE MWIMAGE MODIFY (IMG_USER_TEXT NOT NULL ENABLE);
  ALTER TABLE MWIMAGE MODIFY (IMG_USER NOT NULL ENABLE);
  ALTER TABLE MWIMAGE MODIFY (IMG_BITS NOT NULL ENABLE);
  ALTER TABLE MWIMAGE MODIFY (IMG_HEIGHT NOT NULL ENABLE);
  ALTER TABLE MWIMAGE MODIFY (IMG_WIDTH NOT NULL ENABLE);
  ALTER TABLE MWIMAGE MODIFY (IMG_SIZE NOT NULL ENABLE);
  ALTER TABLE MWIMAGE MODIFY (IMG_NAME NOT NULL ENABLE);




  ALTER TABLE MWIMAGELINKS MODIFY (IL_TO NOT NULL ENABLE);
  ALTER TABLE MWIMAGELINKS MODIFY (IL_FROM NOT NULL ENABLE);




  ALTER TABLE MWINTERWIKI MODIFY (IW_TRANS NOT NULL ENABLE);
  ALTER TABLE MWINTERWIKI MODIFY (IW_LOCAL NOT NULL ENABLE);
  ALTER TABLE MWINTERWIKI MODIFY (IW_API NOT NULL ENABLE);
  ALTER TABLE MWINTERWIKI MODIFY (IW_URL NOT NULL ENABLE);
  ALTER TABLE MWINTERWIKI MODIFY (IW_PREFIX NOT NULL ENABLE);




  ALTER TABLE MWIPBLOCKS ADD CONSTRAINT MWIPBLOCKS_PK PRIMARY KEY (IPB_ID)
  USING INDEX  ENABLE;
  ALTER TABLE MWIPBLOCKS MODIFY (IPB_ALLOW_USERTALK NOT NULL ENABLE);
  ALTER TABLE MWIPBLOCKS MODIFY (IPB_BLOCK_EMAIL NOT NULL ENABLE);
  ALTER TABLE MWIPBLOCKS MODIFY (IPB_DELETED NOT NULL ENABLE);
  ALTER TABLE MWIPBLOCKS MODIFY (IPB_EXPIRY NOT NULL ENABLE);
  ALTER TABLE MWIPBLOCKS MODIFY (IPB_ENABLE_AUTOBLOCK NOT NULL ENABLE);
  ALTER TABLE MWIPBLOCKS MODIFY (IPB_CREATE_ACCOUNT NOT NULL ENABLE);
  ALTER TABLE MWIPBLOCKS MODIFY (IPB_ANON_ONLY NOT NULL ENABLE);
  ALTER TABLE MWIPBLOCKS MODIFY (IPB_AUTO NOT NULL ENABLE);
  ALTER TABLE MWIPBLOCKS MODIFY (IPB_TIMESTAMP NOT NULL ENABLE);
  ALTER TABLE MWIPBLOCKS MODIFY (IPB_REASON NOT NULL ENABLE);
  ALTER TABLE MWIPBLOCKS MODIFY (IPB_BY NOT NULL ENABLE);
  ALTER TABLE MWIPBLOCKS MODIFY (IPB_USER NOT NULL ENABLE);
  ALTER TABLE MWIPBLOCKS MODIFY (IPB_ID NOT NULL ENABLE);




  ALTER TABLE MWIWLINKS MODIFY (IWL_FROM NOT NULL ENABLE);




  ALTER TABLE MWJOB ADD CONSTRAINT MWJOB_PK PRIMARY KEY (JOB_ID)
  USING INDEX  ENABLE;
  ALTER TABLE MWJOB MODIFY (JOB_ATTEMPTS NOT NULL ENABLE);
  ALTER TABLE MWJOB MODIFY (JOB_RANDOM NOT NULL ENABLE);
  ALTER TABLE MWJOB MODIFY (JOB_PARAMS NOT NULL ENABLE);
  ALTER TABLE MWJOB MODIFY (JOB_TITLE NOT NULL ENABLE);
  ALTER TABLE MWJOB MODIFY (JOB_NAMESPACE NOT NULL ENABLE);
  ALTER TABLE MWJOB MODIFY (JOB_CMD NOT NULL ENABLE);
  ALTER TABLE MWJOB MODIFY (JOB_ID NOT NULL ENABLE);




  ALTER TABLE MWL10N_CACHE MODIFY (LC_VALUE NOT NULL ENABLE);
  ALTER TABLE MWL10N_CACHE MODIFY (LC_KEY NOT NULL ENABLE);
  ALTER TABLE MWL10N_CACHE MODIFY (LC_LANG NOT NULL ENABLE);




  ALTER TABLE MWLANGLINKS MODIFY (LL_FROM NOT NULL ENABLE);




  ALTER TABLE MWLOGGING ADD CONSTRAINT MWLOGGING_PK PRIMARY KEY (LOG_ID)
  USING INDEX  ENABLE;
  ALTER TABLE MWLOGGING MODIFY (LOG_DELETED NOT NULL ENABLE);
  ALTER TABLE MWLOGGING MODIFY (LOG_TITLE NOT NULL ENABLE);
  ALTER TABLE MWLOGGING MODIFY (LOG_NAMESPACE NOT NULL ENABLE);
  ALTER TABLE MWLOGGING MODIFY (LOG_USER NOT NULL ENABLE);
  ALTER TABLE MWLOGGING MODIFY (LOG_TIMESTAMP NOT NULL ENABLE);
  ALTER TABLE MWLOGGING MODIFY (LOG_ACTION NOT NULL ENABLE);
  ALTER TABLE MWLOGGING MODIFY (LOG_TYPE NOT NULL ENABLE);
  ALTER TABLE MWLOGGING MODIFY (LOG_ID NOT NULL ENABLE);




  ALTER TABLE MWLOG_SEARCH ADD CONSTRAINT LOG_SEARCH_PK PRIMARY KEY (LS_FIELD, LS_VALUE, LS_LOG_ID)
  USING INDEX  ENABLE;
  ALTER TABLE MWLOG_SEARCH MODIFY (LS_LOG_ID NOT NULL ENABLE);
  ALTER TABLE MWLOG_SEARCH MODIFY (LS_VALUE NOT NULL ENABLE);
  ALTER TABLE MWLOG_SEARCH MODIFY (LS_FIELD NOT NULL ENABLE);




  ALTER TABLE MWMODULE_DEPS MODIFY (MD_DEPS NOT NULL ENABLE);
  ALTER TABLE MWMODULE_DEPS MODIFY (MD_SKIN NOT NULL ENABLE);
  ALTER TABLE MWMODULE_DEPS MODIFY (MD_MODULE NOT NULL ENABLE);




  ALTER TABLE MWMSG_RESOURCE MODIFY (MR_TIMESTAMP NOT NULL ENABLE);
  ALTER TABLE MWMSG_RESOURCE MODIFY (MR_BLOB NOT NULL ENABLE);
  ALTER TABLE MWMSG_RESOURCE MODIFY (MR_LANG NOT NULL ENABLE);
  ALTER TABLE MWMSG_RESOURCE MODIFY (MR_RESOURCE NOT NULL ENABLE);




  ALTER TABLE MWMSG_RESOURCE_LINKS MODIFY (MRL_MESSAGE NOT NULL ENABLE);
  ALTER TABLE MWMSG_RESOURCE_LINKS MODIFY (MRL_RESOURCE NOT NULL ENABLE);




  ALTER TABLE MWMWUSER ADD CONSTRAINT MWMWUSER_PK PRIMARY KEY (USER_ID)
  USING INDEX  ENABLE;
  ALTER TABLE MWMWUSER MODIFY (USER_NAME NOT NULL ENABLE);
  ALTER TABLE MWMWUSER MODIFY (USER_ID NOT NULL ENABLE);




  ALTER TABLE MWOBJECTCACHE MODIFY (EXPTIME NOT NULL ENABLE);




  ALTER TABLE MWOLDIMAGE MODIFY (OI_DELETED NOT NULL ENABLE);
  ALTER TABLE MWOLDIMAGE MODIFY (OI_TIMESTAMP NOT NULL ENABLE);
  ALTER TABLE MWOLDIMAGE MODIFY (OI_USER_TEXT NOT NULL ENABLE);
  ALTER TABLE MWOLDIMAGE MODIFY (OI_USER NOT NULL ENABLE);
  ALTER TABLE MWOLDIMAGE MODIFY (OI_BITS NOT NULL ENABLE);
  ALTER TABLE MWOLDIMAGE MODIFY (OI_HEIGHT NOT NULL ENABLE);
  ALTER TABLE MWOLDIMAGE MODIFY (OI_WIDTH NOT NULL ENABLE);
  ALTER TABLE MWOLDIMAGE MODIFY (OI_SIZE NOT NULL ENABLE);
  ALTER TABLE MWOLDIMAGE MODIFY (OI_NAME NOT NULL ENABLE);




  ALTER TABLE MWPAGE ADD CONSTRAINT MWPAGE_PK PRIMARY KEY (PAGE_ID)
  USING INDEX  ENABLE;
  ALTER TABLE MWPAGE MODIFY (PAGE_LEN NOT NULL ENABLE);
  ALTER TABLE MWPAGE MODIFY (PAGE_LATEST NOT NULL ENABLE);
  ALTER TABLE MWPAGE MODIFY (PAGE_RANDOM NOT NULL ENABLE);
  ALTER TABLE MWPAGE MODIFY (PAGE_IS_NEW NOT NULL ENABLE);
  ALTER TABLE MWPAGE MODIFY (PAGE_IS_REDIRECT NOT NULL ENABLE);
  ALTER TABLE MWPAGE MODIFY (PAGE_COUNTER NOT NULL ENABLE);
  ALTER TABLE MWPAGE MODIFY (PAGE_TITLE NOT NULL ENABLE);
  ALTER TABLE MWPAGE MODIFY (PAGE_NAMESPACE NOT NULL ENABLE);
  ALTER TABLE MWPAGE MODIFY (PAGE_ID NOT NULL ENABLE);




  ALTER TABLE MWPAGECONTENT ADD CONSTRAINT MWPAGECONTENT_PK PRIMARY KEY (OLD_ID)
  USING INDEX  ENABLE;
  ALTER TABLE MWPAGECONTENT MODIFY (OLD_ID NOT NULL ENABLE);




  ALTER TABLE MWPAGELINKS MODIFY (PL_TITLE NOT NULL ENABLE);
  ALTER TABLE MWPAGELINKS MODIFY (PL_NAMESPACE NOT NULL ENABLE);
  ALTER TABLE MWPAGELINKS MODIFY (PL_FROM NOT NULL ENABLE);




  ALTER TABLE MWPAGE_PROPS MODIFY (PP_VALUE NOT NULL ENABLE);
  ALTER TABLE MWPAGE_PROPS MODIFY (PP_PROPNAME NOT NULL ENABLE);
  ALTER TABLE MWPAGE_PROPS MODIFY (PP_PAGE NOT NULL ENABLE);




  ALTER TABLE MWPAGE_RESTRICTIONS ADD CONSTRAINT MWPAGE_RESTRICTIONS_PK PRIMARY KEY (PR_ID)
  USING INDEX  ENABLE;
  ALTER TABLE MWPAGE_RESTRICTIONS MODIFY (PR_CASCADE NOT NULL ENABLE);
  ALTER TABLE MWPAGE_RESTRICTIONS MODIFY (PR_LEVEL NOT NULL ENABLE);
  ALTER TABLE MWPAGE_RESTRICTIONS MODIFY (PR_TYPE NOT NULL ENABLE);
  ALTER TABLE MWPAGE_RESTRICTIONS MODIFY (PR_PAGE NOT NULL ENABLE);
  ALTER TABLE MWPAGE_RESTRICTIONS MODIFY (PR_ID NOT NULL ENABLE);




  ALTER TABLE MWPROTECTED_TITLES MODIFY (PT_CREATE_PERM NOT NULL ENABLE);
  ALTER TABLE MWPROTECTED_TITLES MODIFY (PT_EXPIRY NOT NULL ENABLE);
  ALTER TABLE MWPROTECTED_TITLES MODIFY (PT_TIMESTAMP NOT NULL ENABLE);
  ALTER TABLE MWPROTECTED_TITLES MODIFY (PT_USER NOT NULL ENABLE);
  ALTER TABLE MWPROTECTED_TITLES MODIFY (PT_TITLE NOT NULL ENABLE);
  ALTER TABLE MWPROTECTED_TITLES MODIFY (PT_NAMESPACE NOT NULL ENABLE);




  ALTER TABLE MWQUERYCACHE MODIFY (QC_TITLE NOT NULL ENABLE);
  ALTER TABLE MWQUERYCACHE MODIFY (QC_NAMESPACE NOT NULL ENABLE);
  ALTER TABLE MWQUERYCACHE MODIFY (QC_VALUE NOT NULL ENABLE);
  ALTER TABLE MWQUERYCACHE MODIFY (QC_TYPE NOT NULL ENABLE);




  ALTER TABLE MWQUERYCACHETWO MODIFY (QCC_NAMESPACETWO NOT NULL ENABLE);
  ALTER TABLE MWQUERYCACHETWO MODIFY (QCC_NAMESPACE NOT NULL ENABLE);
  ALTER TABLE MWQUERYCACHETWO MODIFY (QCC_VALUE NOT NULL ENABLE);
  ALTER TABLE MWQUERYCACHETWO MODIFY (QCC_TYPE NOT NULL ENABLE);




  ALTER TABLE MWQUERYCACHE_INFO MODIFY (QCI_TYPE NOT NULL ENABLE);




  ALTER TABLE MWRECENTCHANGES ADD CONSTRAINT MWRECENTCHANGES_PK PRIMARY KEY (RC_ID)
  USING INDEX  ENABLE;
  ALTER TABLE MWRECENTCHANGES MODIFY (RC_LOGID NOT NULL ENABLE);
  ALTER TABLE MWRECENTCHANGES MODIFY (RC_DELETED NOT NULL ENABLE);
  ALTER TABLE MWRECENTCHANGES MODIFY (RC_PATROLLED NOT NULL ENABLE);
  ALTER TABLE MWRECENTCHANGES MODIFY (RC_TYPE NOT NULL ENABLE);
  ALTER TABLE MWRECENTCHANGES MODIFY (RC_LAST_OLDID NOT NULL ENABLE);
  ALTER TABLE MWRECENTCHANGES MODIFY (RC_THIS_OLDID NOT NULL ENABLE);
  ALTER TABLE MWRECENTCHANGES MODIFY (RC_CUR_ID NOT NULL ENABLE);
  ALTER TABLE MWRECENTCHANGES MODIFY (RC_NEW NOT NULL ENABLE);
  ALTER TABLE MWRECENTCHANGES MODIFY (RC_BOT NOT NULL ENABLE);
  ALTER TABLE MWRECENTCHANGES MODIFY (RC_MINOR NOT NULL ENABLE);
  ALTER TABLE MWRECENTCHANGES MODIFY (RC_TITLE NOT NULL ENABLE);
  ALTER TABLE MWRECENTCHANGES MODIFY (RC_NAMESPACE NOT NULL ENABLE);
  ALTER TABLE MWRECENTCHANGES MODIFY (RC_USER_TEXT NOT NULL ENABLE);
  ALTER TABLE MWRECENTCHANGES MODIFY (RC_USER NOT NULL ENABLE);
  ALTER TABLE MWRECENTCHANGES MODIFY (RC_TIMESTAMP NOT NULL ENABLE);
  ALTER TABLE MWRECENTCHANGES MODIFY (RC_ID NOT NULL ENABLE);




  ALTER TABLE MWREDIRECT MODIFY (RD_TITLE NOT NULL ENABLE);
  ALTER TABLE MWREDIRECT MODIFY (RD_NAMESPACE NOT NULL ENABLE);
  ALTER TABLE MWREDIRECT MODIFY (RD_FROM NOT NULL ENABLE);




  ALTER TABLE MWREVISION ADD CONSTRAINT MWREVISION_PK PRIMARY KEY (REV_ID)
  USING INDEX  ENABLE;
  ALTER TABLE MWREVISION MODIFY (REV_DELETED NOT NULL ENABLE);
  ALTER TABLE MWREVISION MODIFY (REV_MINOR_EDIT NOT NULL ENABLE);
  ALTER TABLE MWREVISION MODIFY (REV_TIMESTAMP NOT NULL ENABLE);
  ALTER TABLE MWREVISION MODIFY (REV_USER_TEXT NOT NULL ENABLE);
  ALTER TABLE MWREVISION MODIFY (REV_USER NOT NULL ENABLE);
  ALTER TABLE MWREVISION MODIFY (REV_PAGE NOT NULL ENABLE);
  ALTER TABLE MWREVISION MODIFY (REV_ID NOT NULL ENABLE);




  ALTER TABLE MWSEARCHINDEX MODIFY (SI_TEXT NOT NULL ENABLE);
  ALTER TABLE MWSEARCHINDEX MODIFY (SI_PAGE NOT NULL ENABLE);




  ALTER TABLE MWSITES ADD CONSTRAINT MWSITES_PK PRIMARY KEY (SITE_ID)
  USING INDEX  ENABLE;
  ALTER TABLE MWSITES MODIFY (SITE_CONFIG NOT NULL ENABLE);
  ALTER TABLE MWSITES MODIFY (SITE_FORWARD NOT NULL ENABLE);
  ALTER TABLE MWSITES MODIFY (SITE_DATA NOT NULL ENABLE);
  ALTER TABLE MWSITES MODIFY (SITE_DOMAIN NOT NULL ENABLE);
  ALTER TABLE MWSITES MODIFY (SITE_PROTOCOL NOT NULL ENABLE);
  ALTER TABLE MWSITES MODIFY (SITE_LANGUAGE NOT NULL ENABLE);
  ALTER TABLE MWSITES MODIFY (SITE_SOURCE NOT NULL ENABLE);
  ALTER TABLE MWSITES MODIFY (SITE_GROUP NOT NULL ENABLE);
  ALTER TABLE MWSITES MODIFY (SITE_TYPE NOT NULL ENABLE);
  ALTER TABLE MWSITES MODIFY (SITE_GLOBAL_KEY NOT NULL ENABLE);
  ALTER TABLE MWSITES MODIFY (SITE_ID NOT NULL ENABLE);




  ALTER TABLE MWSITE_IDENTIFIERS MODIFY (SI_KEY NOT NULL ENABLE);
  ALTER TABLE MWSITE_IDENTIFIERS MODIFY (SI_TYPE NOT NULL ENABLE);
  ALTER TABLE MWSITE_IDENTIFIERS MODIFY (SI_SITE NOT NULL ENABLE);




  ALTER TABLE MWSITE_STATS MODIFY (SS_ROW_ID NOT NULL ENABLE);




  ALTER TABLE MWTAG_SUMMARY MODIFY (TS_TAGS NOT NULL ENABLE);




  ALTER TABLE MWTEMPLATELINKS MODIFY (TL_TITLE NOT NULL ENABLE);
  ALTER TABLE MWTEMPLATELINKS MODIFY (TL_NAMESPACE NOT NULL ENABLE);
  ALTER TABLE MWTEMPLATELINKS MODIFY (TL_FROM NOT NULL ENABLE);




  ALTER TABLE MWTRANSCACHE MODIFY (TC_TIME NOT NULL ENABLE);
  ALTER TABLE MWTRANSCACHE MODIFY (TC_CONTENTS NOT NULL ENABLE);
  ALTER TABLE MWTRANSCACHE MODIFY (TC_URL NOT NULL ENABLE);




  ALTER TABLE MWUPDATELOG ADD CONSTRAINT MWUPDATELOG_PK PRIMARY KEY (UL_KEY)
  USING INDEX  ENABLE;
  ALTER TABLE MWUPDATELOG MODIFY (UL_KEY NOT NULL ENABLE);




  ALTER TABLE MWUPLOADSTASH ADD CONSTRAINT MWUPLOADSTASH_PK PRIMARY KEY (US_ID)
  USING INDEX  ENABLE;
  ALTER TABLE MWUPLOADSTASH MODIFY (US_SHA1 NOT NULL ENABLE);
  ALTER TABLE MWUPLOADSTASH MODIFY (US_SIZE NOT NULL ENABLE);
  ALTER TABLE MWUPLOADSTASH MODIFY (US_STATUS NOT NULL ENABLE);
  ALTER TABLE MWUPLOADSTASH MODIFY (US_PATH NOT NULL ENABLE);
  ALTER TABLE MWUPLOADSTASH MODIFY (US_ORIG_PATH NOT NULL ENABLE);
  ALTER TABLE MWUPLOADSTASH MODIFY (US_KEY NOT NULL ENABLE);
  ALTER TABLE MWUPLOADSTASH MODIFY (US_USER NOT NULL ENABLE);
  ALTER TABLE MWUPLOADSTASH MODIFY (US_ID NOT NULL ENABLE);




  ALTER TABLE MWUSER_FORMER_GROUPS MODIFY (UFG_GROUP NOT NULL ENABLE);
  ALTER TABLE MWUSER_FORMER_GROUPS MODIFY (UFG_USER NOT NULL ENABLE);




  ALTER TABLE MWUSER_GROUPS MODIFY (UG_GROUP NOT NULL ENABLE);
  ALTER TABLE MWUSER_GROUPS MODIFY (UG_USER NOT NULL ENABLE);




  ALTER TABLE MWUSER_NEWTALK MODIFY (USER_ID NOT NULL ENABLE);




  ALTER TABLE MWUSER_PROPERTIES MODIFY (UP_PROPERTY NOT NULL ENABLE);
  ALTER TABLE MWUSER_PROPERTIES MODIFY (UP_USER NOT NULL ENABLE);




  ALTER TABLE MWVALID_TAG ADD CONSTRAINT MWVALID_TAG_PK PRIMARY KEY (VT_TAG)
  USING INDEX  ENABLE;
  ALTER TABLE MWVALID_TAG MODIFY (VT_TAG NOT NULL ENABLE);




  ALTER TABLE MWWATCHLIST MODIFY (WL_TITLE NOT NULL ENABLE);
  ALTER TABLE MWWATCHLIST MODIFY (WL_NAMESPACE NOT NULL ENABLE);
  ALTER TABLE MWWATCHLIST MODIFY (WL_USER NOT NULL ENABLE);




  ALTER TABLE MWARCHIVE ADD CONSTRAINT MWARCHIVE_FK1 FOREIGN KEY (AR_USER)
	  REFERENCES MWMWUSER (USER_ID) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED ENABLE;




  ALTER TABLE MWCATEGORYLINKS ADD CONSTRAINT MWCATEGORYLINKS_FK1 FOREIGN KEY (CL_FROM)
	  REFERENCES MWPAGE (PAGE_ID) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED ENABLE;




  ALTER TABLE MWEXTERNALLINKS ADD CONSTRAINT MWEXTERNALLINKS_FK1 FOREIGN KEY (EL_FROM)
	  REFERENCES MWPAGE (PAGE_ID) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED ENABLE;




  ALTER TABLE MWFILEARCHIVE ADD CONSTRAINT MWFILEARCHIVE_FK1 FOREIGN KEY (FA_DELETED_USER)
	  REFERENCES MWMWUSER (USER_ID) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED ENABLE;
  ALTER TABLE MWFILEARCHIVE ADD CONSTRAINT MWFILEARCHIVE_FK2 FOREIGN KEY (FA_USER)
	  REFERENCES MWMWUSER (USER_ID) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED ENABLE;




  ALTER TABLE MWIMAGE ADD CONSTRAINT MWIMAGE_FK1 FOREIGN KEY (IMG_USER)
	  REFERENCES MWMWUSER (USER_ID) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED ENABLE;




  ALTER TABLE MWIMAGELINKS ADD CONSTRAINT MWIMAGELINKS_FK1 FOREIGN KEY (IL_FROM)
	  REFERENCES MWPAGE (PAGE_ID) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED ENABLE;




  ALTER TABLE MWIPBLOCKS ADD CONSTRAINT MWIPBLOCKS_FK1 FOREIGN KEY (IPB_USER)
	  REFERENCES MWMWUSER (USER_ID) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED ENABLE;
  ALTER TABLE MWIPBLOCKS ADD CONSTRAINT MWIPBLOCKS_FK2 FOREIGN KEY (IPB_BY)
	  REFERENCES MWMWUSER (USER_ID) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED ENABLE;




  ALTER TABLE MWLANGLINKS ADD CONSTRAINT MWLANGLINKS_FK1 FOREIGN KEY (LL_FROM)
	  REFERENCES MWPAGE (PAGE_ID) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED ENABLE;




  ALTER TABLE MWLOGGING ADD CONSTRAINT MWLOGGING_FK1 FOREIGN KEY (LOG_USER)
	  REFERENCES MWMWUSER (USER_ID) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED ENABLE;




  ALTER TABLE MWOLDIMAGE ADD CONSTRAINT MWOLDIMAGE_FK1 FOREIGN KEY (OI_NAME)
	  REFERENCES MWIMAGE (IMG_NAME) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED ENABLE;
  ALTER TABLE MWOLDIMAGE ADD CONSTRAINT MWOLDIMAGE_FK2 FOREIGN KEY (OI_USER)
	  REFERENCES MWMWUSER (USER_ID) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED ENABLE;




  ALTER TABLE MWPAGELINKS ADD CONSTRAINT MWPAGELINKS_FK1 FOREIGN KEY (PL_FROM)
	  REFERENCES MWPAGE (PAGE_ID) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED ENABLE;




  ALTER TABLE MWPAGE_RESTRICTIONS ADD CONSTRAINT MWPAGE_RESTRICTIONS_FK1 FOREIGN KEY (PR_PAGE)
	  REFERENCES MWPAGE (PAGE_ID) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED ENABLE;




  ALTER TABLE MWRECENTCHANGES ADD CONSTRAINT MWRECENTCHANGES_FK1 FOREIGN KEY (RC_USER)
	  REFERENCES MWMWUSER (USER_ID) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED ENABLE;
  ALTER TABLE MWRECENTCHANGES ADD CONSTRAINT MWRECENTCHANGES_FK2 FOREIGN KEY (RC_CUR_ID)
	  REFERENCES MWPAGE (PAGE_ID) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED ENABLE;




  ALTER TABLE MWREDIRECT ADD CONSTRAINT MWREDIRECT_FK1 FOREIGN KEY (RD_FROM)
	  REFERENCES MWPAGE (PAGE_ID) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED ENABLE;




  ALTER TABLE MWREVISION ADD CONSTRAINT MWREVISION_FK1 FOREIGN KEY (REV_PAGE)
	  REFERENCES MWPAGE (PAGE_ID) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED ENABLE;
  ALTER TABLE MWREVISION ADD CONSTRAINT MWREVISION_FK2 FOREIGN KEY (REV_USER)
	  REFERENCES MWMWUSER (USER_ID);




  ALTER TABLE MWTEMPLATELINKS ADD CONSTRAINT MWTEMPLATELINKS_FK1 FOREIGN KEY (TL_FROM)
	  REFERENCES MWPAGE (PAGE_ID) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED ENABLE;




  ALTER TABLE MWUPLOADSTASH ADD CONSTRAINT MWUPLOADSTASH_FK1 FOREIGN KEY (US_USER)
	  REFERENCES MWMWUSER (USER_ID) ON DELETE SET NULL DEFERRABLE INITIALLY DEFERRED ENABLE;




  ALTER TABLE MWUSER_FORMER_GROUPS ADD CONSTRAINT MWUSER_FORMER_GROUPS_FK1 FOREIGN KEY (UFG_USER)
	  REFERENCES MWMWUSER (USER_ID) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED ENABLE;




  ALTER TABLE MWUSER_GROUPS ADD CONSTRAINT MWUSER_GROUPS_FK1 FOREIGN KEY (UG_USER)
	  REFERENCES MWMWUSER (USER_ID) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED ENABLE;




  ALTER TABLE MWUSER_NEWTALK ADD CONSTRAINT MWUSER_NEWTALK_FK1 FOREIGN KEY (USER_ID)
	  REFERENCES MWMWUSER (USER_ID) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED ENABLE;




  ALTER TABLE MWWATCHLIST ADD CONSTRAINT MWWATCHLIST_FK1 FOREIGN KEY (WL_USER)
	  REFERENCES MWMWUSER (USER_ID) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED ENABLE;
