jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/353908 )
Change subject: Make django's makemigrations happy
......................................................................
Make django's makemigrations happy
The ldapdb models are not actually managed by Django's migrations
system, but makemigrations apparently doesn't know that. Rather than
adding a new migration file that does nothing, I'm manually backporting
the changes it wants to make to the initial migration for the project.
This is a complete no-op for both development and production.
Change-Id: I46335e5464d72da175c7ef2402ee968062cbf949
---
M striker/tools/migrations/0001_squashed.py
M striker/tools/models.py
2 files changed, 6 insertions(+), 7 deletions(-)
Approvals:
BryanDavis: Looks good to me, approved
jenkins-bot: Verified
diff --git a/striker/tools/migrations/0001_squashed.py
b/striker/tools/migrations/0001_squashed.py
index 06ed066..bcaba25 100644
--- a/striker/tools/migrations/0001_squashed.py
+++ b/striker/tools/migrations/0001_squashed.py
@@ -34,8 +34,8 @@
migrations.CreateModel(
name='Maintainer',
fields=[
- ('dn', models.CharField(max_length=200)),
- ('username', ldapdb.models.fields.CharField(max_length=200,
serialize=False, primary_key=True, db_column='uid')),
+ ('dn', models.CharField(primary_key=True, serialize=False,
max_length=200)),
+ ('username', ldapdb.models.fields.CharField(max_length=200,
unique=True, db_column='uid')),
('full_name', ldapdb.models.fields.CharField(max_length=200,
db_column='cn')),
],
options={
@@ -45,8 +45,8 @@
migrations.CreateModel(
name='Tool',
fields=[
- ('dn', models.CharField(max_length=200)),
- ('cn', ldapdb.models.fields.CharField(max_length=200,
serialize=False, primary_key=True, db_column='cn')),
+ ('dn', models.CharField(primary_key=True, serialize=False,
max_length=200)),
+ ('cn', ldapdb.models.fields.CharField(max_length=200,
unique=True, db_column='cn')),
('gid_number', ldapdb.models.fields.IntegerField(unique=True,
db_column='gidNumber')),
('members',
ldapdb.models.fields.ListField(db_column='member')),
],
diff --git a/striker/tools/models.py b/striker/tools/models.py
index 85fb5b1..bd9aa92 100644
--- a/striker/tools/models.py
+++ b/striker/tools/models.py
@@ -33,7 +33,7 @@
base_dn = settings.TOOLS_MAINTAINER_BASE_DN
object_classes = ['posixAccount']
- username = fields.CharField(db_column='uid', primary_key=True)
+ username = fields.CharField(db_column='uid', unique=True)
full_name = fields.CharField(db_column='cn')
def __str__(self):
@@ -53,8 +53,7 @@
objects = ToolManager()
- cn = fields.CharField(
- db_column='cn', max_length=200, primary_key=True)
+ cn = fields.CharField(db_column='cn', max_length=200, unique=True)
gid_number = fields.IntegerField(db_column='gidNumber', unique=True)
members = fields.ListField(db_column='member')
--
To view, visit https://gerrit.wikimedia.org/r/353908
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I46335e5464d72da175c7ef2402ee968062cbf949
Gerrit-PatchSet: 2
Gerrit-Project: labs/striker
Gerrit-Branch: master
Gerrit-Owner: BryanDavis <[email protected]>
Gerrit-Reviewer: BryanDavis <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits