Permalink
Browse files

create schema and build model

  • Loading branch information...
1 parent 6737863 commit ef1e78564b2560b837fc56f3119ad2c402aa0c48 Florian Pondepeyre committed Mar 7, 2013
Showing with 778 additions and 25 deletions.
  1. +3 −0 .gitignore
  2. +13 −14 app/config/parameters.yml
  3. +265 −0 app/propel/sql/default.sql
  4. +9 −9 composer.lock
  5. +23 −0 rebuild.sh
  6. 0 src/Gr/ModelBundle/Model/.gitkeep
  7. +9 −0 src/Gr/ModelBundle/Model/Document.php
  8. +9 −0 src/Gr/ModelBundle/Model/DocumentPeer.php
  9. +9 −0 src/Gr/ModelBundle/Model/DocumentQuery.php
  10. +9 −0 src/Gr/ModelBundle/Model/News.php
  11. +9 −0 src/Gr/ModelBundle/Model/NewsPeer.php
  12. +9 −0 src/Gr/ModelBundle/Model/NewsQuery.php
  13. +9 −0 src/Gr/ModelBundle/Model/Newspaper.php
  14. +9 −0 src/Gr/ModelBundle/Model/NewspaperPeer.php
  15. +9 −0 src/Gr/ModelBundle/Model/NewspaperQuery.php
  16. +9 −0 src/Gr/ModelBundle/Model/Photo.php
  17. +9 −0 src/Gr/ModelBundle/Model/PhotoPeer.php
  18. +9 −0 src/Gr/ModelBundle/Model/PhotoQuery.php
  19. +9 −0 src/Gr/ModelBundle/Model/Prehome.php
  20. +9 −0 src/Gr/ModelBundle/Model/PrehomePeer.php
  21. +9 −0 src/Gr/ModelBundle/Model/PrehomeQuery.php
  22. +9 −0 src/Gr/ModelBundle/Model/Publication.php
  23. +9 −0 src/Gr/ModelBundle/Model/PublicationPeer.php
  24. +9 −0 src/Gr/ModelBundle/Model/PublicationQuery.php
  25. +9 −0 src/Gr/ModelBundle/Model/Site.php
  26. +9 −0 src/Gr/ModelBundle/Model/SitePeer.php
  27. +9 −0 src/Gr/ModelBundle/Model/SiteQuery.php
  28. +9 −0 src/Gr/ModelBundle/Model/Slide.php
  29. +9 −0 src/Gr/ModelBundle/Model/SlidePeer.php
  30. +9 −0 src/Gr/ModelBundle/Model/SlideQuery.php
  31. +9 −0 src/Gr/ModelBundle/Model/Subject.php
  32. +9 −0 src/Gr/ModelBundle/Model/SubjectPeer.php
  33. +9 −0 src/Gr/ModelBundle/Model/SubjectQuery.php
  34. +9 −0 src/Gr/ModelBundle/Model/Theme.php
  35. +9 −0 src/Gr/ModelBundle/Model/ThemePeer.php
  36. +9 −0 src/Gr/ModelBundle/Model/ThemeQuery.php
  37. +9 −0 src/Gr/ModelBundle/Model/User.php
  38. +9 −0 src/Gr/ModelBundle/Model/UserPeer.php
  39. +9 −0 src/Gr/ModelBundle/Model/UserQuery.php
  40. +168 −2 src/Gr/ModelBundle/Resources/config/schema.xml
View
@@ -7,4 +7,7 @@
/bin/
/composer.phar
+src/Gr/ModelBundle/Model/map/*
+src/Gr/ModelBundle/Model/om/*
+
.idea
@@ -1,15 +1,14 @@
parameters:
- database_driver: pdo_mysql
- database_host: 127.0.0.1
- database_port: ~
- database_name: symfony
- database_user: root
- database_password: ~
-
- mailer_transport: smtp
- mailer_host: 127.0.0.1
- mailer_user: ~
- mailer_password: ~
-
- locale: en
- secret: ThisTokenIsNotSoSecretChangeIt
+ database_driver: pdo_mysql
+ database_host: localhost
+ database_port: null
+ database_name: gr
+ database_user: root
+ database_password: null
+ mailer_transport: smtp
+ mailer_host: localhost
+ mailer_user: null
+ mailer_password: null
+ locale: en
+ secret: d4f33b1f65db934642d1e2bb8902da2223215c72
+ database_path: null
@@ -0,0 +1,265 @@
+
+# This is a fix for InnoDB in MySQL >= 4.1.x
+# It "suspends judgement" for fkey relationships until are tables are set.
+SET FOREIGN_KEY_CHECKS = 0;
+
+-- ---------------------------------------------------------------------
+-- document
+-- ---------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `document`;
+
+CREATE TABLE `document`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `projet_id` INTEGER,
+ `name` VARCHAR(255),
+ `document_name` VARCHAR(255),
+ `document` VARCHAR(255),
+ `mime` VARCHAR(255),
+ `size` VARCHAR(255),
+ `description` TEXT,
+ `active` INTEGER,
+ `priority` INTEGER,
+ `created_at` DATETIME,
+ `updated_at` DATETIME,
+ PRIMARY KEY (`id`),
+ INDEX `document_FI_1` (`projet_id`)
+) ENGINE=MyISAM;
+
+-- ---------------------------------------------------------------------
+-- news
+-- ---------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `news`;
+
+CREATE TABLE `news`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `type` INTEGER NOT NULL,
+ `name` VARCHAR(255),
+ `content` TEXT,
+ `active` INTEGER,
+ `priority` INTEGER NOT NULL,
+ `published_at` DATE,
+ `created_at` DATETIME,
+ `updated_at` DATETIME,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM;
+
+-- ---------------------------------------------------------------------
+-- newspaper
+-- ---------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `newspaper`;
+
+CREATE TABLE `newspaper`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `name` VARCHAR(255),
+ `description` TEXT,
+ `active` INTEGER,
+ `priority` INTEGER(10) NOT NULL,
+ `created_at` DATETIME,
+ `updated_at` DATETIME,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM;
+
+-- ---------------------------------------------------------------------
+-- photo
+-- ---------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `photo`;
+
+CREATE TABLE `photo`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `theme_id` INTEGER,
+ `name` VARCHAR(255),
+ `photo_name` VARCHAR(255),
+ `photo` VARCHAR(255),
+ `mime` VARCHAR(255),
+ `size` VARCHAR(255),
+ `description` TEXT,
+ `active` INTEGER,
+ `priority` INTEGER,
+ `created_at` DATETIME,
+ `updated_at` DATETIME,
+ PRIMARY KEY (`id`),
+ INDEX `photo_FI_1` (`theme_id`)
+) ENGINE=MyISAM;
+
+-- ---------------------------------------------------------------------
+-- prehome
+-- ---------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `prehome`;
+
+CREATE TABLE `prehome`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `name` VARCHAR(255),
+ `photo_name` VARCHAR(255),
+ `photo` VARCHAR(255),
+ `mime` VARCHAR(255),
+ `size` VARCHAR(255),
+ `description` TEXT,
+ `active` INTEGER,
+ `priority` INTEGER,
+ `created_at` DATETIME,
+ `updated_at` DATETIME,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM;
+
+-- ---------------------------------------------------------------------
+-- publication
+-- ---------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `publication`;
+
+CREATE TABLE `publication`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `newspaper_id` INTEGER,
+ `name` VARCHAR(255),
+ `photo_name` VARCHAR(255),
+ `photo` VARCHAR(255),
+ `mime` VARCHAR(255),
+ `size` VARCHAR(255),
+ `description` TEXT,
+ `active` INTEGER,
+ `priority` INTEGER,
+ `ordre` INTEGER(10) NOT NULL,
+ `created_at` DATETIME,
+ `updated_at` DATETIME,
+ PRIMARY KEY (`id`),
+ INDEX `publication_FI_1` (`newspaper_id`)
+) ENGINE=MyISAM;
+
+-- ---------------------------------------------------------------------
+-- site
+-- ---------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `site`;
+
+CREATE TABLE `site`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `active_homepage` INTEGER,
+ `homepage_url` VARCHAR(255),
+ `titre_slide_actu` VARCHAR(255) NOT NULL,
+ `active_slide_actu` INTEGER,
+ `delay_slide_actu` INTEGER,
+ `auto_slide_actu` INTEGER,
+ `continious_slide_actu` INTEGER,
+ `speed_slide_actu` INTEGER,
+ `titre_slide_expo` VARCHAR(255) NOT NULL,
+ `active_slide_expo` INTEGER,
+ `delay_slide_expo` INTEGER,
+ `auto_slide_expo` INTEGER,
+ `continious_slide_expo` INTEGER,
+ `speed_slide_expo` INTEGER,
+ `created_at` DATETIME,
+ `updated_at` DATETIME,
+ `homepage` VARCHAR(255) NOT NULL,
+ `homepageurl` VARCHAR(255) NOT NULL,
+ `temporarypage` INTEGER NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM;
+
+-- ---------------------------------------------------------------------
+-- slide
+-- ---------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `slide`;
+
+CREATE TABLE `slide`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `type` VARCHAR(255),
+ `priority` INTEGER,
+ `title` VARCHAR(255),
+ `photo` VARCHAR(255),
+ `content` TEXT,
+ `active` INTEGER,
+ `created_at` DATETIME,
+ `updated_at` DATETIME,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM;
+
+-- ---------------------------------------------------------------------
+-- subject
+-- ---------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `subject`;
+
+CREATE TABLE `subject`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `title` VARCHAR(255),
+ `created_at` DATETIME,
+ `updated_at` DATETIME,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM;
+
+-- ---------------------------------------------------------------------
+-- theme
+-- ---------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `theme`;
+
+CREATE TABLE `theme`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `user_id` INTEGER,
+ `name` VARCHAR(255),
+ `photo` VARCHAR(255),
+ `photo_name` VARCHAR(255),
+ `mime` VARCHAR(255),
+ `size` VARCHAR(255),
+ `description` TEXT,
+ `active` INTEGER,
+ `archive` INTEGER NOT NULL,
+ `priority` INTEGER,
+ `created_at` DATETIME,
+ `updated_at` DATETIME,
+ PRIMARY KEY (`id`),
+ INDEX `theme_FI_1` (`user_id`)
+) ENGINE=MyISAM;
+
+-- ---------------------------------------------------------------------
+-- user
+-- ---------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `user`;
+
+CREATE TABLE `user`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `lname` VARCHAR(255),
+ `fname` VARCHAR(255),
+ `address` VARCHAR(255),
+ `cp` VARCHAR(255),
+ `town` VARCHAR(255),
+ `country` VARCHAR(255),
+ `email` VARCHAR(255),
+ `tel` VARCHAR(255),
+ `fax` VARCHAR(255),
+ `mobile` VARCHAR(255),
+ `login` VARCHAR(255),
+ `pwd` VARCHAR(255),
+ `photo` VARCHAR(255),
+ `photo_name` VARCHAR(255),
+ `mime` VARCHAR(255),
+ `size` VARCHAR(255),
+ `biography` TEXT,
+ `active` INTEGER,
+ `priority` INTEGER,
+ `type` INTEGER,
+ `created_at` DATETIME,
+ `updated_at` DATETIME,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM;
+
+# This restores the fkey checks, after having unset them earlier
+SET FOREIGN_KEY_CHECKS = 1;
View
Oops, something went wrong.
Oops, something went wrong.

0 comments on commit ef1e785

Please sign in to comment.