You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.
When I run my migration to create the old_passwords table, I'm getting the error:
Mysql2::Error: All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead: CREATE TABLE old_passwords (id int(11) DEFAULT NULL auto_increment PRIMARY KEY, encrypted_password varchar(255) NOT NULL, password_salt varchar(255), password_archivable_type varchar(255) NOT NULL, password_archivable_id int(11) NOT NULL, created_at datetime) ENGINE=InnoDB
I've already got devise installed, and running. I am trying to add password archiving to my application. I've added the migration:
create_table :old_passwords do |t|
t.string :encrypted_password, :null => false
t.string :password_salt
t.string :password_archivable_type, :null => false
t.integer :password_archivable_id, :null => false
t.datetime :created_at
end
add_index :old_passwords, [:password_archivable_type, :password_archivable_id], :name => :index_password_archivable
and it fails with that error message. I tried downgrading to 0.7 and it had the same problem. Am I missing something?
Thanks
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When I run my migration to create the old_passwords table, I'm getting the error:
Mysql2::Error: All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead: CREATE TABLE
old_passwords
(id
int(11) DEFAULT NULL auto_increment PRIMARY KEY,encrypted_password
varchar(255) NOT NULL,password_salt
varchar(255),password_archivable_type
varchar(255) NOT NULL,password_archivable_id
int(11) NOT NULL,created_at
datetime) ENGINE=InnoDBI've already got devise installed, and running. I am trying to add password archiving to my application. I've added the migration:
create_table :old_passwords do |t|
t.string :encrypted_password, :null => false
t.string :password_salt
t.string :password_archivable_type, :null => false
t.integer :password_archivable_id, :null => false
t.datetime :created_at
end
add_index :old_passwords, [:password_archivable_type, :password_archivable_id], :name => :index_password_archivable
and it fails with that error message. I tried downgrading to 0.7 and it had the same problem. Am I missing something?
Thanks
The text was updated successfully, but these errors were encountered: