No. Order is not important. Jorge Bastos wrote: > Ok > With this i noticed other thing, the fields order are diferent: > > My table: > > Owner_idnr > Active > Name > Script > > Create_table.* file: > > Owner_idnr > Name > Script > Active > > My order is wrong right? Should I correct the order? > > > > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf > Of Paul J Stevens > Sent: sábado, 9 de Fevereiro de 2008 19:59 > To: DBMail mailinglist > Subject: Re: [Dbmail] DBMail 2.3.2 released > > Jorge Bastos wrote: >> Ok, >> I rechecked all tables against "create_tables.*" file, and all are > updated. >> I had a lot without foreign keys (ouch), hopefully I never had any > problems, >> maybe because if the nightly dbmail-util? >> I just faced one difference in the structure of one table, >> dbmail_sievescripts, I have the table with these fields sinse it was > created >> in 2.0.x. >> >> My table: >> CREATE TABLE `dbmail_sievescripts` ( >> `id` bigint(20) NOT NULL auto_increment, >> `owner_idnr` bigint(20) NOT NULL default '0', >> `active` tinyint(1) NOT NULL default '0', >> `name` varchar(100) NOT NULL, >> `script` text NOT NULL, >> PRIMARY KEY (`id`), >> KEY `dbmail_sievescripts_1` (`owner_idnr`,`name`), >> KEY `dbmail_sievescripts_2` (`owner_idnr`,`active`), >> CONSTRAINT `dbmail_sievescripts_ibfk_1` FOREIGN KEY (`owner_idnr`) >> REFERENCES `dbmail_users` (`user_idnr`) ON DELETE CASCADE ON UPDATE > CASCADE >> ) ENGINE=InnoDB AUTO_INCREMENT=346 DEFAULT CHARSET=utf8 >> >> >> Create_table.* file: >> CREATE TABLE dbmail_sievescripts ( >> owner_idnr bigint(21) DEFAULT '0' NOT NULL, >> name varchar(100) NOT NULL, >> script text, >> active tinyint(1) default '0' not null, >> INDEX (name), >> INDEX (owner_idnr), >> UNIQUE INDEX (owner_idnr, name), >> FOREIGN KEY owner_idnr_fk (owner_idnr) >> REFERENCES dbmail_users (user_idnr) ON DELETE CASCADE ON UPDATE > CASCADE >> ) ENGINE=InnoDB DEFAULT CHARSET=utf8; >> >> >> So, I have a plus field that is "id", can I remove this field, or is the >> create_table.* file that is missing this field? > > You can remove that field. But please pay attention to the keys. In the > vanilla dbmail sievescripts table there is a UNIQUE INDEX (owner_idnr, > name) that is *not* there in your schema. > > >
-- ________________________________________________________________ Paul Stevens paul at nfg.nl NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31 The Netherlands________________________________http://www.nfg.nl _______________________________________________ DBmail mailing list [email protected] https://mailman.fastxs.nl/mailman/listinfo/dbmail
