|Home | Gallery | Stats | Downloads | Links | Scripts | Fuel Stats | Wiki | RSS|
A lie gets halfway around the world before the truth has a chance to get its pants on.-- Winston Churchill Add quote.
If you see an error like below when you try to create a graphite user you will need to update the graphite database in order for user create to work.
django.db.utils.IntegrityError: NOT NULL constraint failed: auth_user.last_login
Unfortunately sqlite doesn't support the drop constraint syntax so you will need to create a new temporary table, copy over the existing table, and then rename.
CREATE TABLE "auth_user2" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "password" varchar(128) NOT NULL, "last_login" datetime NULL, "is_superuser" bool NOT NULL, "username" varchar(30) NOT NULL UNIQUE, "first_name" varchar(30) NOT NULL, "last_name" varchar(30) NOT NULL, "email" varchar(75) NOT NULL, "is_staff" bool NOT NULL, "is_active" bool NOT NULL, "date_joined" datetime NOT NULL); insert into auth_user2 select * from auth_user ; drop table auth_user ; alter table auth_user2 rename to auth_user ;
Now user creation should work.
root@graphite:/usr/local/lib/python2.7/site-packages/graphite # python manage.py createsuperuser Username (leave blank to use 'root'): wattersm Email address: firstname.lastname@example.org Password: Password (again): Superuser created successfully.