I will like a module that create a database, and i got it to work with this code
<?php
$installer = $this;
$installer->startSetup();
$sql=<<<SQLTEXT
create table emailorder(emailorders_id int not null auto_increment, name varchar(100), primary key(emailorder_id));
insert into emailorder values(1,'emailorder1');
insert into emailorder values(2,'emailorder2');
SQLTEXT;
$installer->run($sql);
//demo
//Mage::getModel('core/url_rewrite')->setId(null);
//demo
$installer->endSetup();
Then i wanted more cells in my table so i deleted it and tried this code
<?php
$installer = $this;
$installer->startSetup();
$sql=<<<SQLTEXT
create table emailorders(
emailorders_id int not null auto_increment,
primary key(emailorders_id),
order_date datetime NOT NULL,
location varchar NOT NULL,
date_for varchar NOT NULL,
name_title varchar(100) NOT NULL,
email varchar NOT NULL,
company varchar NOT NULL,
address varchar NOT NULL,
zipcode varchar NOT NULL,
city varchar NOT NULL,
phone varchar NOT NULL,
comment text NOT NULL default,
order_executed boolean NOT NULL default
);
insert into emailorders values(1,'emailorders1');
insert into emailorders values(2,'emailorders2');
SQLTEXT;
$installer->run($sql);
//demo
//Mage::getModel('core/url_rewrite')->setId(null);
//demo
$installer->endSetup();
It does not work and now the first code don't work either :(
What am i doing wrong?