dszymczuk/MySQL-Dump-with-Foreign-keys — pull request #1 by antarasi (2014-03-21 11:48:29+00:00)
Title: poprawienie obsługi DEFAULT '...' i DEFAULT NULL

#ORYGINALNY PHPMYADMIN DUMP

CREATE TABLE IF NOT EXISTS `news` (
`newsId` int(11) NOT NULL AUTO_INCREMENT,
`newsName` varchar(100) NOT NULL,
`date` date **NOT NULL DEFAULT '2014-01-01',**
`langName` varchar(50) NOT NULL,
`html` text NOT NULL,
`published` varchar(1) NOT NULL,
`news_categoryId` int(11) **DEFAULT NULL,**
PRIMARY KEY (`newsId`),
KEY `news_categoryId` (`news_categoryId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=10 ;

#FK_DUMP

CREATE TABLE `news` (
`newsId` int(11) NOT NULL auto_increment,
`newsName` varchar(100) NOT NULL,
`date` date **NOT NULL,**
`langName` varchar(50) NOT NULL,
`html` text NOT NULL,
`published` varchar(1) NOT NULL,
`news_categoryId` int(11) **,**
PRIMARY KEY (`newsId`),
KEY `news_categoryId` (`news_categoryId`)
) ENGINE=InnoDB AUTO_INCREMENT=10;

#POPRAWIONE
CREATE TABLE `news` (
`newsId` int(11) NOT NULL auto_increment,
`newsName` varchar(100) NOT NULL,
`date` date **NOT NULL DEFAULT '2014-01-01',**
`langName` varchar(50) NOT NULL,
`html` text NOT NULL,
`published` varchar(1) NOT NULL,
`news_categoryId` int(11) **DEFAULT NULL,**
PRIMARY KEY (`newsId`),
KEY `news_categoryId` (`news_categoryId`)
) ENGINE=InnoDB AUTO_INCREMENT=10;