users: drop email column.

This commit is contained in:
evazion
2020-03-25 02:51:30 -05:00
parent ea8cdadce9
commit 4b1114b4a4
4 changed files with 9 additions and 11 deletions

View File

@@ -8,7 +8,7 @@
<%= edit_form_for(@user, url: user_email_path(@user)) do |f| %>
<%= f.input :password %>
<%= f.input :email %>
<%= f.input :email, as: :email, input_html: { value: "" } %>
<%= f.submit "Save" %>
<% end %>
</div>

View File

@@ -15,7 +15,7 @@
<div id="p3">
<%= edit_form_for(@user, html: { id: "signup-form" }) do |f| %>
<%= f.input :name, as: :string %>
<%= f.input :email, label: "Email", required: false, as: :email, hint: "Optional" %>
<%= f.input :email, label: "Email", required: false, as: :email, input_html: { value: "" }, hint: "Optional" %>
<%= f.input :password %>
<%= f.input :password_confirmation %>

View File

@@ -0,0 +1,5 @@
class DropEmailsFromUsers < ActiveRecord::Migration[6.0]
def change
remove_column :users, :email, :string
end
end

View File

@@ -2201,7 +2201,6 @@ CREATE TABLE public.users (
id integer NOT NULL,
name character varying NOT NULL,
level integer DEFAULT 20 NOT NULL,
email character varying,
inviter_id integer,
created_at timestamp without time zone NOT NULL,
last_logged_in_at timestamp without time zone DEFAULT now(),
@@ -6989,13 +6988,6 @@ CREATE INDEX index_user_name_change_requests_on_user_id ON public.user_name_chan
CREATE INDEX index_users_on_created_at ON public.users USING btree (created_at);
--
-- Name: index_users_on_email; Type: INDEX; Schema: public; Owner: -
--
CREATE INDEX index_users_on_email ON public.users USING btree (email) WHERE (email IS NOT NULL);
--
-- Name: index_users_on_inviter_id; Type: INDEX; Schema: public; Owner: -
--
@@ -7371,6 +7363,7 @@ INSERT INTO "schema_migrations" (version) VALUES
('20200309035334'),
('20200309043653'),
('20200318224633'),
('20200325073456');
('20200325073456'),
('20200325074859');