title: How to correctly do CREATE INDEX with SQLite
body: <p>I'm trying to convert my MySQL create table statements to SQLite create table statements. Most of it I've done, however I don't know how to change MySQL's UNIQUE INDEX to Sqlites CREATE INDEX (I thought that these were roughly the same, please correct me if I'm wrong). </p>
  
  <p>So I have the following MySQL table (it's changed a bit from the :</p>
  
  <pre><code>-- -----------------------------------------------------
  -- Table `pyMS`.`feature`
  -- -----------------------------------------------------
  CREATE  TABLE IF NOT EXISTS `pyMS`.`feature` (
    `feature_id` VARCHAR(40) NOT NULL ,
    `intensity` DOUBLE NOT NULL ,
    `overallquality` DOUBLE NOT NULL ,
    `quality` DOUBLE NOT NULL ,
    `charge` INT NOT NULL ,
    `content` VARCHAR(45) NOT NULL ,
    `msrun_msrun_id` INT NOT NULL ,
    PRIMARY KEY (`feature_id`, `msrun_msrun_id`) ,
    UNIQUE INDEX `id_UNIQUE` (`feature_id` ASC) ,
    INDEX `fk_feature_msrun1` (`msrun_msrun_id` ASC) ,
    CONSTRAINT `fk_feature_msrun1`
      FOREIGN KEY (`msrun_msrun_id` )
      REFERENCES `pyMS`.`msrun` (`msrun_id` )
      ON DELETE NO ACTION
      ON UPDATE NO ACTION)
  ENGINE = InnoDB;
  </code></pre>
  
  <p>And I changed the index according to <a href="http://www.sqlite.org/lang_createindex.html">http://www.sqlite.org/lang_createindex.html</a>. I did also change some other things to go from MySQL to SQLite but I tested it and they work. 
  So this is my SQLite code:</p>
  
  <pre><code>-- -----------------------------------------------------
  -- Table `feature`
  -- -----------------------------------------------------
  CREATE  TABLE IF NOT EXISTS `feature` (
    `feature_id` VARCHAR(40) NOT NULL ,
    `intensity` DOUBLE NOT NULL ,
    `overallquality` DOUBLE NOT NULL ,
    `quality` DOUBLE NOT NULL ,
    `charge` INT NOT NULL ,
    `content` VARCHAR(45) NOT NULL ,
    `msrun_msrun_id` INT NOT NULL ,
    CREATE UNIQUE INDEX `id_UNIQUE` ON `feature` (`feature_id` ASC) ,
    CREATE INDEX `fk_feature_msrun1` ON `msrun` (`msrun_msrun_id` ASC) ,
    CONSTRAINT `fk_feature_msrun1`
      FOREIGN KEY (`msrun_msrun_id` )
      REFERENCES `msrun` (`msrun_id` )
      ON DELETE NO ACTION
      ON UPDATE NO ACTION);
  </code></pre>
  
  <p>This does not work. When I remove the INDEX lines it does work. As far as I can see the INDEX lines comply to this description <a href="http://www.sqlite.org/lang_createindex.html">http://www.sqlite.org/lang_createindex.html</a>, I don't see where it goes wrong. So how can I change the two lines </p>
  
  <pre><code>CREATE UNIQUE INDEX `id_UNIQUE` ON `feature` (`feature_id` ASC) ,
  CREATE INDEX `fk_feature_msrun1` ON `msrun` (`msrun_msrun_id` ASC) ,
  </code></pre>
  
  <p>to make their syntax correct?</p>