Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e7b325d4
authored
Feb 09, 2013
by
tarokkk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
school: Migration fix
parent
55b15545
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
118 deletions
+4
-118
school/migrations/0001_initial.py
+2
-86
school/migrations/0002_auto__del_entity__del_lessonclass__del_lesson__del_person__del_mark__d.py
+2
-32
No files found.
school/migrations/0001_initial.py
View file @
e7b325d4
...
@@ -9,90 +9,7 @@ class Migration(SchemaMigration):
...
@@ -9,90 +9,7 @@ class Migration(SchemaMigration):
def
forwards
(
self
,
orm
):
def
forwards
(
self
,
orm
):
# Adding model 'Person'
# Adding model 'Person'
db
.
create_table
(
'school_person'
,
(
pass
(
'id'
,
self
.
gf
(
'django.db.models.fields.AutoField'
)(
primary_key
=
True
)),
(
'user'
,
self
.
gf
(
'django.db.models.fields.related.ForeignKey'
)(
to
=
orm
[
'auth.User'
],
unique
=
True
)),
(
'language'
,
self
.
gf
(
'django.db.models.fields.CharField'
)(
default
=
'hu'
,
max_length
=
6
)),
))
db
.
send_create_signal
(
'school'
,
[
'Person'
])
# Adding model 'Entity'
db
.
create_table
(
'school_entity'
,
(
(
'id'
,
self
.
gf
(
'django.db.models.fields.AutoField'
)(
primary_key
=
True
)),
(
'parent'
,
self
.
gf
(
'django.db.models.fields.related.ForeignKey'
)(
to
=
orm
[
'school.Group'
])),
(
'name'
,
self
.
gf
(
'django.db.models.fields.CharField'
)(
max_length
=
100
)),
))
db
.
send_create_signal
(
'school'
,
[
'Entity'
])
# Adding model 'Group'
db
.
create_table
(
'school_group'
,
(
(
'entity_ptr'
,
self
.
gf
(
'django.db.models.fields.related.OneToOneField'
)(
to
=
orm
[
'school.Entity'
],
unique
=
True
,
primary_key
=
True
)),
(
'recursive_unique'
,
self
.
gf
(
'django.db.models.fields.BooleanField'
)(
default
=
False
)),
))
db
.
send_create_signal
(
'school'
,
[
'Group'
])
# Adding model 'Course'
db
.
create_table
(
'school_course'
,
(
(
'entity_ptr'
,
self
.
gf
(
'django.db.models.fields.related.OneToOneField'
)(
to
=
orm
[
'school.Entity'
],
unique
=
True
,
primary_key
=
True
)),
))
db
.
send_create_signal
(
'school'
,
[
'Course'
])
# Adding model 'Semester'
db
.
create_table
(
'school_semester'
,
(
(
'entity_ptr'
,
self
.
gf
(
'django.db.models.fields.related.OneToOneField'
)(
to
=
orm
[
'school.Entity'
],
unique
=
True
,
primary_key
=
True
)),
(
'start'
,
self
.
gf
(
'django.db.models.fields.DateField'
)()),
(
'end'
,
self
.
gf
(
'django.db.models.fields.DateField'
)()),
))
db
.
send_create_signal
(
'school'
,
[
'Semester'
])
# Adding model 'Event'
db
.
create_table
(
'school_event'
,
(
(
'id'
,
self
.
gf
(
'django.db.models.fields.AutoField'
)(
primary_key
=
True
)),
(
'title'
,
self
.
gf
(
'django.db.models.fields.CharField'
)(
max_length
=
100
)),
(
'group'
,
self
.
gf
(
'django.db.models.fields.related.ForeignKey'
)(
to
=
orm
[
'school.Group'
])),
(
'type'
,
self
.
gf
(
'django.db.models.fields.CharField'
)(
max_length
=
5
)),
))
db
.
send_create_signal
(
'school'
,
[
'Event'
])
# Adding model 'Mark'
db
.
create_table
(
'school_mark'
,
(
(
'id'
,
self
.
gf
(
'django.db.models.fields.AutoField'
)(
primary_key
=
True
)),
(
'value'
,
self
.
gf
(
'django.db.models.fields.CharField'
)(
max_length
=
100
)),
(
'student'
,
self
.
gf
(
'django.db.models.fields.related.ForeignKey'
)(
to
=
orm
[
'school.Person'
])),
(
'event'
,
self
.
gf
(
'django.db.models.fields.related.ForeignKey'
)(
to
=
orm
[
'school.Event'
])),
(
'created_by'
,
self
.
gf
(
'django.db.models.fields.related.ForeignKey'
)(
related_name
=
'created_marks'
,
to
=
orm
[
'school.Person'
])),
(
'created_at'
,
self
.
gf
(
'django.db.models.fields.DateTimeField'
)(
auto_now_add
=
True
,
blank
=
True
)),
(
'modified_by'
,
self
.
gf
(
'django.db.models.fields.related.ForeignKey'
)(
related_name
=
'modified_marks'
,
to
=
orm
[
'school.Person'
])),
(
'modified_at'
,
self
.
gf
(
'django.db.models.fields.DateTimeField'
)(
auto_now
=
True
,
blank
=
True
)),
))
db
.
send_create_signal
(
'school'
,
[
'Mark'
])
# Adding model 'Attendance'
db
.
create_table
(
'school_attendance'
,
(
(
'id'
,
self
.
gf
(
'django.db.models.fields.AutoField'
)(
primary_key
=
True
)),
(
'present'
,
self
.
gf
(
'django.db.models.fields.NullBooleanField'
)(
null
=
True
,
blank
=
True
)),
(
'student'
,
self
.
gf
(
'django.db.models.fields.related.ForeignKey'
)(
to
=
orm
[
'school.Person'
])),
(
'lesson'
,
self
.
gf
(
'django.db.models.fields.related.ForeignKey'
)(
to
=
orm
[
'school.Lesson'
])),
(
'modified_by'
,
self
.
gf
(
'django.db.models.fields.related.ForeignKey'
)(
related_name
=
'modified_attendances'
,
to
=
orm
[
'school.Person'
])),
(
'modified_at'
,
self
.
gf
(
'django.db.models.fields.DateTimeField'
)(
auto_now
=
True
,
blank
=
True
)),
))
db
.
send_create_signal
(
'school'
,
[
'Attendance'
])
# Adding model 'LessonClass'
db
.
create_table
(
'school_lessonclass'
,
(
(
'id'
,
self
.
gf
(
'django.db.models.fields.AutoField'
)(
primary_key
=
True
)),
(
'group'
,
self
.
gf
(
'django.db.models.fields.related.ForeignKey'
)(
to
=
orm
[
'school.Group'
])),
))
db
.
send_create_signal
(
'school'
,
[
'LessonClass'
])
# Adding model 'Lesson'
db
.
create_table
(
'school_lesson'
,
(
(
'id'
,
self
.
gf
(
'django.db.models.fields.AutoField'
)(
primary_key
=
True
)),
(
'lesson_class'
,
self
.
gf
(
'django.db.models.fields.related.ForeignKey'
)(
to
=
orm
[
'school.LessonClass'
])),
(
'group'
,
self
.
gf
(
'django.db.models.fields.related.ForeignKey'
)(
to
=
orm
[
'school.Group'
])),
))
db
.
send_create_signal
(
'school'
,
[
'Lesson'
])
def
backwards
(
self
,
orm
):
def
backwards
(
self
,
orm
):
# Deleting model 'Person'
# Deleting model 'Person'
...
@@ -230,4 +147,4 @@ class Migration(SchemaMigration):
...
@@ -230,4 +147,4 @@ class Migration(SchemaMigration):
}
}
}
}
complete_apps
=
[
'school'
]
complete_apps
=
[
'school'
]
\ No newline at end of file
school/migrations/0002_auto__del_entity__del_lessonclass__del_lesson__del_person__del_mark__d.py
View file @
e7b325d4
...
@@ -8,36 +8,7 @@ from django.db import models
...
@@ -8,36 +8,7 @@ from django.db import models
class
Migration
(
SchemaMigration
):
class
Migration
(
SchemaMigration
):
def
forwards
(
self
,
orm
):
def
forwards
(
self
,
orm
):
# Deleting model 'Entity'
pass
db
.
delete_table
(
'school_entity'
)
# Deleting model 'LessonClass'
db
.
delete_table
(
'school_lessonclass'
)
# Deleting model 'Lesson'
db
.
delete_table
(
'school_lesson'
)
# Deleting model 'Person'
db
.
delete_table
(
'school_person'
)
# Deleting model 'Mark'
db
.
delete_table
(
'school_mark'
)
# Deleting model 'Course'
db
.
delete_table
(
'school_course'
)
# Deleting model 'Semester'
db
.
delete_table
(
'school_semester'
)
# Deleting model 'Event'
db
.
delete_table
(
'school_event'
)
# Deleting model 'Attendance'
db
.
delete_table
(
'school_attendance'
)
# Deleting model 'Group'
db
.
delete_table
(
'school_group'
)
def
backwards
(
self
,
orm
):
def
backwards
(
self
,
orm
):
# Adding model 'Entity'
# Adding model 'Entity'
...
@@ -130,4 +101,4 @@ class Migration(SchemaMigration):
...
@@ -130,4 +101,4 @@ class Migration(SchemaMigration):
}
}
complete_apps
=
[
'school'
]
complete_apps
=
[
'school'
]
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment