Permalink
Browse files

Rozsah predmetu moze byt null.

  • Loading branch information...
1 parent 8ed8593 commit 30fe9643990fc75a95a4fb453786710b63b62036 @martin-sucha martin-sucha committed Oct 13, 2012
Showing with 2 additions and 3 deletions.
  1. +1 −1 config/doctrine/schema.yml
  2. +1 −1 data/sql/schema.sql
  3. +0 −1 lib/model/doctrine/base/BaseSubject.class.php
@@ -152,7 +152,7 @@ Subject:
code: { type: string(50), notnull: true }
short_code: { type: string(20), notnull: true }
credit_value: { type: integer, notnull: true }
- rozsah: { type: string(30), notnull: true }
+ rozsah: { type: string(30) }
external_id: { type: string(30) }
indexes:
external_id_index:
View
@@ -7,7 +7,7 @@ CREATE TABLE room (id BIGINT AUTO_INCREMENT, name VARCHAR(30) NOT NULL, room_typ
CREATE TABLE room_type (id BIGINT AUTO_INCREMENT, name VARCHAR(30) NOT NULL, code VARCHAR(1) NOT NULL, PRIMARY KEY(id)) ENGINE = INNODB;
CREATE TABLE student_group (id BIGINT AUTO_INCREMENT, name VARCHAR(30) NOT NULL, UNIQUE INDEX name_index_idx (name), PRIMARY KEY(id)) ENGINE = INNODB;
CREATE TABLE student_group_lessons (student_group_id BIGINT, lesson_id BIGINT, PRIMARY KEY(student_group_id, lesson_id)) ENGINE = INNODB;
-CREATE TABLE subject (id BIGINT AUTO_INCREMENT, name VARCHAR(100) NOT NULL, code VARCHAR(50) NOT NULL, short_code VARCHAR(20) NOT NULL, credit_value BIGINT NOT NULL, rozsah VARCHAR(30) NOT NULL, external_id VARCHAR(30), UNIQUE INDEX external_id_index_idx (external_id), PRIMARY KEY(id)) ENGINE = INNODB;
+CREATE TABLE subject (id BIGINT AUTO_INCREMENT, name VARCHAR(100) NOT NULL, code VARCHAR(50) NOT NULL, short_code VARCHAR(20) NOT NULL, credit_value BIGINT NOT NULL, rozsah VARCHAR(30), external_id VARCHAR(30), UNIQUE INDEX external_id_index_idx (external_id), PRIMARY KEY(id)) ENGINE = INNODB;
CREATE TABLE teacher (id BIGINT AUTO_INCREMENT, given_name VARCHAR(50), family_name VARCHAR(50) NOT NULL, iniciala VARCHAR(50), oddelenie VARCHAR(50), katedra VARCHAR(50), external_id VARCHAR(30), login VARCHAR(50), slug VARCHAR(100), UNIQUE INDEX login_index_idx (login), UNIQUE INDEX slug_index_idx (slug), PRIMARY KEY(id)) ENGINE = INNODB;
CREATE TABLE teacher_lessons (id BIGINT AUTO_INCREMENT, teacher_id BIGINT NOT NULL, lesson_id BIGINT NOT NULL, INDEX teacher_id_idx (teacher_id), INDEX lesson_id_idx (lesson_id), PRIMARY KEY(id)) ENGINE = INNODB;
CREATE TABLE user (id INT AUTO_INCREMENT, login VARCHAR(50) NOT NULL UNIQUE, PRIMARY KEY(id)) ENGINE = INNODB;
@@ -59,7 +59,6 @@ public function setTableDefinition()
));
$this->hasColumn('rozsah', 'string', 30, array(
'type' => 'string',
- 'notnull' => true,
'length' => 30,
));
$this->hasColumn('external_id', 'string', 30, array(

0 comments on commit 30fe964

Please sign in to comment.