Fakultas Ilmu Komputer UI

Commit e94df367 authored by Muhammad Fauzan Fikri's avatar Muhammad Fauzan Fikri
Browse files

add migrations

parent 003cdc07
# -*- coding: utf-8 -*-
# Generated by Django 1.11.17 on 2019-11-16 08:22
# Generated by Django 1.11.17 on 2019-12-03 03:38
from __future__ import unicode_literals
import core.lib.validators
......@@ -34,12 +34,12 @@ class Migration(migrations.Migration):
('created', models.DateTimeField(auto_now_add=True)),
('updated', models.DateTimeField(auto_now=True)),
('description', models.TextField()),
('status', models.IntegerField(default=0)),
('status', models.IntegerField(default=0, validators=[django.core.validators.MaxValueValidator(2), django.core.validators.MinValueValidator(0)])),
('logo', models.FileField(blank=True, null=True, upload_to=core.models.accounts.get_company_logo_file_path, validators=[core.lib.validators.validate_image_file_extension])),
('address', models.CharField(blank=True, max_length=1000, null=True)),
('category', models.CharField(default=b'Belum ada kategori perusahaan', max_length=140)),
('category', models.CharField(default='Belum ada kategori perusahaan', max_length=140)),
('size', models.CharField(blank=True, default=0, max_length=10, null=True)),
('website', models.CharField(default=b'Belum ada link website', max_length=100)),
('website', models.CharField(default='Belum ada link website', max_length=100)),
('linkedin_url', models.URLField(blank=True, null=True)),
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
......@@ -52,7 +52,7 @@ class Migration(migrations.Migration):
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created', models.DateTimeField(auto_now_add=True)),
('title', models.CharField(blank=True, default=b'', max_length=100)),
('title', models.CharField(blank=True, default='', max_length=100)),
('content', models.TextField()),
('companyId', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='core.Company')),
],
......@@ -64,7 +64,7 @@ class Migration(migrations.Migration):
name='Recommendation',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('content', models.TextField()),
('content', models.TextField(blank=True)),
('created', models.DateTimeField(auto_now_add=True)),
('updated', models.DateTimeField(auto_now=True)),
],
......@@ -79,16 +79,16 @@ class Migration(migrations.Migration):
('created', models.DateTimeField(auto_now_add=True)),
('updated', models.DateTimeField(auto_now=True)),
('npm', models.IntegerField(unique=True, validators=[core.lib.validators.validate_npm])),
('resume', models.FileField(blank=True, null=True, upload_to=core.models.accounts.get_student_resume_file_path, validators=[django.core.validators.FileExtensionValidator([b'pdf'])])),
('resume', models.FileField(blank=True, null=True, upload_to=core.models.accounts.get_student_resume_file_path, validators=[django.core.validators.FileExtensionValidator(['pdf'])])),
('sertifikat', models.FileField(blank=True, null=True, upload_to=core.models.accounts.get_student_sertifikat_file_path, validators=[core.lib.validators.validate_document_file_extension])),
('phone_number', models.CharField(blank=True, db_index=True, max_length=100, null=True, validators=[django.core.validators.RegexValidator(b'^0\\d{1,11}$')])),
('phone_number', models.CharField(blank=True, db_index=True, max_length=100, null=True, validators=[django.core.validators.RegexValidator('^0\\d{1,11}$')])),
('gender', models.CharField(blank=True, max_length=30, null=True)),
('birth_place', models.CharField(blank=True, max_length=30, null=True)),
('birth_date', models.DateField(blank=True, null=True)),
('major', models.CharField(blank=True, max_length=30, null=True)),
('batch', models.CharField(blank=True, max_length=4, null=True)),
('show_transcript', models.BooleanField(default=False)),
('photo', models.FileField(blank=True, null=True, upload_to=core.models.accounts.get_student_photo_file_path, validators=[django.core.validators.FileExtensionValidator([b'jpg', b'jpeg', b'png'])])),
('photo', models.FileField(blank=True, null=True, upload_to=core.models.accounts.get_student_photo_file_path, validators=[django.core.validators.FileExtensionValidator(['jpg', 'jpeg', 'png'])])),
('self_description', models.CharField(blank=True, db_index=True, max_length=500, null=True)),
('portfolio_link', models.URLField(blank=True, null=True)),
('linkedin_url', models.URLField(blank=True, null=True)),
......@@ -104,9 +104,10 @@ class Migration(migrations.Migration):
('github_url', models.URLField(blank=True, null=True)),
('gitlab_url', models.URLField(blank=True, null=True)),
('intro', models.CharField(blank=True, max_length=50, null=True)),
('expected_salary', models.CharField(blank=True, max_length=10, null=True, validators=[django.core.validators.RegexValidator(b'^\\d{0,10}$')])),
('expected_salary', models.CharField(blank=True, max_length=10, null=True, validators=[django.core.validators.RegexValidator('^\\d{0,10}$')])),
('job_seeking_status', models.CharField(blank=True, max_length=30, null=True)),
('student_gpa', models.FloatField(blank=True, db_column=b'student_gpa', default=1.0, null=True, validators=[core.lib.validators.validate_student_gpa])),
('student_gpa', models.FloatField(blank=True, db_column='student_gpa', default=1.0, null=True, validators=[core.lib.validators.validate_student_gpa])),
('student_toefl', models.CharField(blank=True, max_length=3, null=True)),
('volunteer', models.CharField(blank=True, max_length=100, null=True)),
('awards', models.CharField(blank=True, max_length=100, null=True)),
('projects', models.CharField(blank=True, max_length=100, null=True)),
......@@ -114,7 +115,7 @@ class Migration(migrations.Migration):
('languages', models.CharField(blank=True, max_length=100, null=True)),
('seminar', models.CharField(blank=True, max_length=100, null=True)),
('interests', models.CharField(blank=True, max_length=100, null=True)),
('dependants', models.IntegerField(blank=True, db_column=b'dependants', default=0, null=True)),
('dependants', models.IntegerField(blank=True, db_column='dependants', default=0, null=True)),
],
options={
'ordering': ['-updated'],
......@@ -174,7 +175,7 @@ class Migration(migrations.Migration):
name='ReasonRejected',
fields=[
('application', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='core.Application')),
('reason', models.TextField(default=b'Tidak memenuhi kualifikasi perusahaan.')),
('reason', models.TextField(default='Tidak memenuhi kualifikasi perusahaan.')),
],
),
migrations.AddField(
......@@ -200,12 +201,12 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='recommendation',
name='recommendation_giver',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='giver', to='core.Student'),
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='giver', to='core.Student'),
),
migrations.AddField(
model_name='recommendation',
name='recommendation_receiver',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='receiver', to='core.Student'),
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='receiver', to='core.Student'),
),
migrations.AddField(
model_name='feedback',
......
# -*- coding: utf-8 -*-
# Generated by Django 1.11.17 on 2019-12-01 10:01
from __future__ import unicode_literals
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='company',
name='status',
field=models.IntegerField(default=0, validators=[django.core.validators.MaxValueValidator(2), django.core.validators.MinValueValidator(0)]),
),
migrations.AlterField(
model_name='recommendation',
name='content',
field=models.TextField(blank=True),
),
migrations.AlterField(
model_name='recommendation',
name='recommendation_giver',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='giver', to='core.Student'),
),
migrations.AlterField(
model_name='recommendation',
name='recommendation_receiver',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='receiver', to='core.Student'),
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.11.17 on 2019-12-03 03:51
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='student',
name='student_toefl',
field=models.IntegerField(blank=True, db_column='toefl', default=0, null=True),
),
]
......@@ -111,7 +111,7 @@ class Student(models.Model):
job_seeking_status = models.CharField(max_length=30, blank=True, null=True)
student_gpa = models.FloatField(db_column='student_gpa', default=1.0, blank=True, null=True,
validators=[validate_student_gpa])
student_toefl = models.CharField(max_length=3, blank=True, null=True)
student_toefl = models.IntegerField(db_column='toefl', default=0, blank=True, null=True)
volunteer = models.CharField(max_length=100, blank=True, null=True)
awards = models.CharField(max_length=100, blank=True, null=True)
projects = models.CharField(max_length=100, blank=True, null=True)
......
......@@ -395,9 +395,9 @@ class ProfileUpdateTests(APITestCase):
self.assertEqual(response.status_code, status.HTTP_202_ACCEPTED)
url = '/api/students/' + str(student_id) + "/profile/"
response = self.client.patch(url, {'TOEFL': 500}, format='multipart')
response = self.client.patch(url, {'TOEFL': 0}, format='multipart')
self.assertEqual(response.status_code, status.HTTP_202_ACCEPTED)
self.assertEqual(response.data.get('student_toefl'), 500)
self.assertEqual(response.data.get('student_toefl'), 0)
url = '/api/students/' + str(student_id) + "/profile/"
response = self.client.patch(url, {'student_toefl': 'this is not valid input'}, format='multipart')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment