Bonjour,
P'tite question pour ma culture personnelle ! Est-ce qu'il y a un impact quelconque sur l'ordre et la structure d'une table de base de données ?
Par exemple, sur une BDD de Presta. la table "customer" fraichement installée, j'ai :
CREATE TABLE IF NOT EXISTS `ps_customer` (
`id_customer` int(10) unsigned NOT NULL,
`id_shop_group` int(11) unsigned NOT NULL DEFAULT '1',
`id_shop` int(11) unsigned NOT NULL DEFAULT '1',
`id_gender` int(10) unsigned NOT NULL,
`id_default_group` int(10) unsigned NOT NULL DEFAULT '1',
`id_lang` int(10) unsigned DEFAULT NULL,
`id_risk` int(10) unsigned NOT NULL DEFAULT '1',
`company` varchar(64) DEFAULT NULL,
`siret` varchar(14) DEFAULT NULL,
`ape` varchar(5) DEFAULT NULL,
`firstname` varchar(32) NOT NULL,
`lastname` varchar(32) NOT NULL,
`email` varchar(128) NOT NULL,
....
...
Sur une base modifiée :
CREATE TABLE IF NOT EXISTS `ps_customer` (
`id_customer` int(10) unsigned NOT NULL,
`email` varchar(128) NOT NULL,
`company` varchar(64) DEFAULT NULL,
`id_gender` int(10) unsigned NOT NULL,
`id_lang` int(10) unsigned DEFAULT NULL,
`id_risk` int(10) unsigned NOT NULL DEFAULT '1',
`id_shop_group` int(11) unsigned NOT NULL DEFAULT '1',
`siret` varchar(14) DEFAULT NULL,
`ape` varchar(5) DEFAULT NULL,
`firstname` varchar(32) NOT NULL,
`lastname` varchar(32) NOT NULL,
`id_default_group` int(10) unsigned NOT NULL DEFAULT '1',
`id_shop` int(11) unsigned NOT NULL DEFAULT '1',
....
...