Merge migrations
This commit is contained in:
parent
519089f8a3
commit
df3c19af80
7 changed files with 11 additions and 37 deletions
|
@ -25,7 +25,7 @@ en:
|
||||||
attributes:
|
attributes:
|
||||||
account:
|
account:
|
||||||
id: ID
|
id: ID
|
||||||
username: Username
|
nickname: Username
|
||||||
public_name: Public name
|
public_name: Public name
|
||||||
biography: Bio
|
biography: Bio
|
||||||
avatar: Avatar
|
avatar: Avatar
|
||||||
|
|
|
@ -25,7 +25,7 @@ ru:
|
||||||
attributes:
|
attributes:
|
||||||
account:
|
account:
|
||||||
id: ID
|
id: ID
|
||||||
username: Имя пользователя
|
nickname: Имя пользователя
|
||||||
public_name: Публичное имя
|
public_name: Публичное имя
|
||||||
biography: Биография
|
biography: Биография
|
||||||
avatar: Аватар
|
avatar: Аватар
|
||||||
|
|
|
@ -22,6 +22,7 @@ class DeviseCreateUsers < ActiveRecord::Migration[5.2]
|
||||||
t.timestamps null: false
|
t.timestamps null: false
|
||||||
|
|
||||||
t.string :guest_token, null: false, index: { unique: true }
|
t.string :guest_token, null: false, index: { unique: true }
|
||||||
|
t.string :nickname, null: false, index: { unique: true }
|
||||||
|
|
||||||
t.references :person, index: { unique: true }
|
t.references :person, index: { unique: true }
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
class AddUsernameToAccounts < ActiveRecord::Migration[6.0]
|
|
||||||
def change
|
|
||||||
add_column :accounts, :username, :string, index: { unique: true }
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,17 +0,0 @@
|
||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
class UniqueUsernameOfAccounts < ActiveRecord::Migration[6.0]
|
|
||||||
def change
|
|
||||||
reversible do |dir|
|
|
||||||
dir.up do
|
|
||||||
change_column :accounts, :username, :string, null: false,
|
|
||||||
index: { unique: true }
|
|
||||||
end
|
|
||||||
|
|
||||||
dir.down do
|
|
||||||
change_column :accounts, :username, :string, null: false,
|
|
||||||
index: { unique: false }
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,7 +0,0 @@
|
||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
class RenameAccountsUsernameToNickname < ActiveRecord::Migration[6.0]
|
|
||||||
def change
|
|
||||||
rename_column :accounts, :username, :nickname
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -101,8 +101,8 @@ CREATE TABLE public.accounts (
|
||||||
created_at timestamp without time zone NOT NULL,
|
created_at timestamp without time zone NOT NULL,
|
||||||
updated_at timestamp without time zone NOT NULL,
|
updated_at timestamp without time zone NOT NULL,
|
||||||
guest_token character varying NOT NULL,
|
guest_token character varying NOT NULL,
|
||||||
person_id bigint,
|
|
||||||
nickname character varying NOT NULL,
|
nickname character varying NOT NULL,
|
||||||
|
person_id bigint,
|
||||||
biography text,
|
biography text,
|
||||||
public_name character varying,
|
public_name character varying,
|
||||||
contacts_list_id bigint NOT NULL,
|
contacts_list_id bigint NOT NULL,
|
||||||
|
@ -838,6 +838,13 @@ CREATE UNIQUE INDEX index_accounts_on_contacts_list_id ON public.accounts USING
|
||||||
CREATE UNIQUE INDEX index_accounts_on_guest_token ON public.accounts USING btree (guest_token);
|
CREATE UNIQUE INDEX index_accounts_on_guest_token ON public.accounts USING btree (guest_token);
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Name: index_accounts_on_nickname; Type: INDEX; Schema: public; Owner: -
|
||||||
|
--
|
||||||
|
|
||||||
|
CREATE UNIQUE INDEX index_accounts_on_nickname ON public.accounts USING btree (nickname);
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Name: index_accounts_on_person_id; Type: INDEX; Schema: public; Owner: -
|
-- Name: index_accounts_on_person_id; Type: INDEX; Schema: public; Owner: -
|
||||||
--
|
--
|
||||||
|
@ -1133,13 +1140,10 @@ SET search_path TO "$user", public;
|
||||||
INSERT INTO "schema_migrations" (version) VALUES
|
INSERT INTO "schema_migrations" (version) VALUES
|
||||||
('20181129203927'),
|
('20181129203927'),
|
||||||
('20181130024918'),
|
('20181130024918'),
|
||||||
('20190201002444'),
|
|
||||||
('20190201012021'),
|
|
||||||
('20190201035804'),
|
('20190201035804'),
|
||||||
('20190201214347'),
|
('20190201214347'),
|
||||||
('20190202041009'),
|
('20190202041009'),
|
||||||
('20190208062215'),
|
('20190208062215'),
|
||||||
('20190324192022'),
|
|
||||||
('20190324204513'),
|
('20190324204513'),
|
||||||
('20190324210722'),
|
('20190324210722'),
|
||||||
('20190324211036'),
|
('20190324211036'),
|
||||||
|
|
Reference in a new issue