<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>db/migrations/1.0.2/up.sql</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,11 +1,12 @@
+DROP DATABASE IF EXISTS `lifestream`;
 CREATE DATABASE IF NOT EXISTS `lifestream` /*!40100 DEFAULT CHARACTER SET utf8 */;
 
 USE lifestream
 
 SET FOREIGN_KEY_CHECKS=0;
 
-DROP TABLE IF EXISTS _VERSION_1_0_1;
-CREATE TABLE `_VERSION_1_0_1` (
+DROP TABLE IF EXISTS _VERSION_1_0_2;
+CREATE TABLE `_VERSION_1_0_2` (
   `dummy` varchar(1) default NULL
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
@@ -54,4 +55,23 @@ CREATE TABLE `streams` (
   CONSTRAINT `fk_streams_service_id` FOREIGN KEY (`service_id`) REFERENCES `services` (`id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
+DROP TABLE IF EXISTS tags;
+CREATE TABLE `tags` (
+  `id` int(11) NOT NULL auto_increment,
+  `name` varchar(50) default NULL,
+  `clean_name` varchar(50) default NULL,
+  `created_at` DATETIME default NULL,
+  `updated_at` DATETIME default NULL,
+  PRIMARY KEY  (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+DROP TABLE IF EXISTS tagged_streams;
+CREATE TABLE `tagged_streams` (
+  `tag_id` int(11) NOT NULL,
+  `stream_id` int(11) NOT NULL,
+  PRIMARY KEY  (`tag_id`,`stream_id`),
+  CONSTRAINT `fk_tags_tag_id` FOREIGN KEY (`tag_id`) REFERENCES `tags` (`id`),
+  CONSTRAINT `fk_streams_streams_id` FOREIGN KEY (`stream_id`) REFERENCES `streams` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
 SET FOREIGN_KEY_CHECKS=1
\ No newline at end of file</diff>
      <filename>db/schema.sql</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e38904e0ff3fd730971829cff3656be4f3ba6930</id>
    </parent>
  </parents>
  <author>
    <name>Johan Nilsson</name>
    <email>github@markupartist.com</email>
  </author>
  <url>http://github.com/johannilsson/phplifestream/commit/7456a26300a7acd16b717fd73de2d7b1e9b19f6e</url>
  <id>7456a26300a7acd16b717fd73de2d7b1e9b19f6e</id>
  <committed-date>2009-01-18T05:21:45-08:00</committed-date>
  <authored-date>2009-01-18T05:21:45-08:00</authored-date>
  <message>Updated schema with tags</message>
  <tree>1db22b2cc8a1f0c6eb96fec9da5f21128ac4a06f</tree>
  <committer>
    <name>Johan Nilsson</name>
    <email>github@markupartist.com</email>
  </committer>
</commit>
