Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
ven-job
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Trịnh Hoàng Phúc
ven-job
Commits
4439bf12
Commit
4439bf12
authored
May 13, 2020
by
Trịnh Hoàng Phúc
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.zigexn.vn:phucth/ven-job into feature/social_authenticate
parents
c8d575c6
e3ce2959
Pipeline
#617
failed with stages
in 0 seconds
Changes
25
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
57 additions
and
342 deletions
+57
-342
app/controllers/application_controller.rb
+1
-0
app/models/user.rb
+1
-1
app/views/devise/confirmations/new.html.erb
+21
-9
app/views/devise/mailer/confirmation_instructions.html.erb
+1
-2
app/views/devise/registrations/new.html.erb
+3
-1
app/views/devise/sessions/new.html.erb
+3
-1
app/views/devise/shared/_links.html.erb
+1
-1
app/views/users/confirmations/new.html.erb
+0
-16
app/views/users/mailer/confirmation_instructions.html.erb
+0
-5
app/views/users/mailer/email_changed.html.erb
+0
-7
app/views/users/mailer/password_change.html.erb
+0
-3
app/views/users/mailer/reset_password_instructions.html.erb
+0
-8
app/views/users/mailer/unlock_instructions.html.erb
+0
-7
app/views/users/passwords/edit.html.erb
+0
-25
app/views/users/passwords/new.html.erb
+0
-29
app/views/users/registrations/edit.html.erb
+0
-70
app/views/users/registrations/new.html.erb
+0
-47
app/views/users/sessions/new.html.erb
+0
-38
app/views/users/shared/_error_messages.html.erb
+0
-15
app/views/users/shared/_links.html.erb
+0
-25
app/views/users/unlocks/new.html.erb
+0
-16
config/environments/development.rb
+4
-0
config/routes.rb
+2
-1
db/migrate/20200408024813_devise_create_users.rb
+5
-5
db/schema.rb
+15
-10
No files found.
app/controllers/application_controller.rb
View file @
4439bf12
...
...
@@ -2,6 +2,7 @@ class ApplicationController < ActionController::Base
before_action
:configure_permitted_parameters
,
if: :devise_controller?
protected
def
configure_permitted_parameters
devise_parameter_sanitizer
.
permit
(
:sign_up
,
keys:
[
:full_name
])
devise_parameter_sanitizer
.
permit
(
:account_update
,
keys:
[
:full_name
,
:cv
])
...
...
app/models/user.rb
View file @
4439bf12
...
...
@@ -2,7 +2,7 @@ class User < ApplicationRecord
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable, :trackable and :omniauthable
devise
:database_authenticatable
,
:registerable
,
:recoverable
,
:rememberable
,
:validatable
:recoverable
,
:rememberable
,
:validatable
,
:confirmable
has_many
:applies
has_many
:jobs
,
through: :applies
...
...
app/views/devise/confirmations/new.html.erb
View file @
4439bf12
<h2>
Resend confirmation instructions
</h2>
<%=
form_for
(
resource
,
as:
resource_name
,
url:
confirmation_path
(
resource_name
),
html:
{
method: :post
})
do
|
f
|
%>
<%
set_meta_tags
title:
"VenJob - Resend confirmation instructions"
,
description:
"VenJob - Resend confirmation instructions"
,
keywords:
"VenJob - Resend confirmation instructions"
%>
<header
class=
"page-header"
>
<h2
class=
"page-title"
>
Resend confirmation instructions
</h2>
</header>
<div
id=
"primary"
class=
"content-area container"
role=
"main"
>
<article
id=
"post-1673"
class=
"post-1673 page type-page status-publish hentry"
>
<div
class=
"entry-content"
>
<div
class=
"registration-form woocommerce"
>
<%=
form_for
(
resource
,
as:
resource_name
,
url:
user_confirmation_path
(
resource_name
),
html:
{
method: :post
})
do
|
f
|
%>
<%=
render
"devise/shared/error_messages"
,
resource:
resource
%>
<div
class=
"field"
>
<p
class=
"field"
>
<%=
f
.
label
:email
%>
<br
/>
<%=
f
.
email_field
:email
,
autofocus:
true
,
autocomplete:
"email"
,
value:
(
resource
.
pending_reconfirmation?
?
resource
.
unconfirmed_email
:
resource
.
email
)
%>
</div
>
</p
>
<div
class=
"actions"
>
<p
class=
"actions"
>
<%=
f
.
submit
"Resend confirmation instructions"
%>
</div
>
<%
end
%>
</p
>
<%
end
%>
<%=
render
"devise/shared/links"
%>
<%=
render
"devise/shared/links"
%>
</div>
</div>
</div>
</div>
app/views/devise/mailer/confirmation_instructions.html.erb
View file @
4439bf12
<p>
Welcome
<%=
@email
%>
!
</p>
<p>
You can confirm your account email through the link below:
</p>
<p>
<%=
link_to
'Confirm my account'
,
confirmation_url
(
@resource
,
confirmation_token:
@token
)
%>
</p>
<p>
<%=
link_to
'Confirm my account'
,
user_confirmation_url
(
confirmation_token:
@token
)
%>
</p>
app/views/devise/registrations/new.html.erb
View file @
4439bf12
<%
content_for
:title
,
"VenJob - Sign Up"
%>
<%
set_meta_tags
title:
"VenJob - Sign Up"
,
description:
"VenJob - Sign Up"
,
keywords:
"VenJob - Sign Up"
%>
<header
class=
"page-header"
>
<h2
class=
"page-title"
>
Sign Up
</h2>
</header>
...
...
app/views/devise/sessions/new.html.erb
View file @
4439bf12
<%
content_for
:title
,
"VenJob - Sign In"
%>
<%
set_meta_tags
title:
"VenJob - Sign In"
,
description:
"VenJob - Sign In"
,
keywords:
"VenJob - Sign In"
%>
<header
class=
"page-header"
>
<h2
class=
"page-title"
>
Sign In
</h2>
</header>
...
...
app/views/devise/shared/_links.html.erb
View file @
4439bf12
...
...
@@ -11,7 +11,7 @@
<%
end
%>
<%-
if
devise_mapping
.
confirmable?
&&
controller_name
!=
'confirmations'
%>
<%=
link_to
"Didn't receive confirmation instructions?"
,
new_confirmation_path
(
resource_name
)
%>
<br
/>
<%=
link_to
"Didn't receive confirmation instructions?"
,
new_
user_
confirmation_path
(
resource_name
)
%>
<br
/>
<%
end
%>
<%-
if
devise_mapping
.
lockable?
&&
resource_class
.
unlock_strategy_enabled?
(
:email
)
&&
controller_name
!=
'unlocks'
%>
...
...
app/views/users/confirmations/new.html.erb
deleted
100644 → 0
View file @
c8d575c6
<h2>
Resend confirmation instructions
</h2>
<%=
form_for
(
resource
,
as:
resource_name
,
url:
confirmation_path
(
resource_name
),
html:
{
method: :post
})
do
|
f
|
%>
<%=
render
"devise/shared/error_messages"
,
resource:
resource
%>
<div
class=
"field"
>
<%=
f
.
label
:email
%>
<br
/>
<%=
f
.
email_field
:email
,
autofocus:
true
,
autocomplete:
"email"
,
value:
(
resource
.
pending_reconfirmation?
?
resource
.
unconfirmed_email
:
resource
.
email
)
%>
</div>
<div
class=
"actions"
>
<%=
f
.
submit
"Resend confirmation instructions"
%>
</div>
<%
end
%>
<%=
render
"users/shared/links"
%>
app/views/users/mailer/confirmation_instructions.html.erb
deleted
100644 → 0
View file @
c8d575c6
<p>
Welcome
<%=
@email
%>
!
</p>
<p>
You can confirm your account email through the link below:
</p>
<p>
<%=
link_to
'Confirm my account'
,
confirmation_url
(
@resource
,
confirmation_token:
@token
)
%>
</p>
app/views/users/mailer/email_changed.html.erb
deleted
100644 → 0
View file @
c8d575c6
<p>
Hello
<%=
@email
%>
!
</p>
<%
if
@resource
.
try
(
:unconfirmed_email?
)
%>
<p>
We're contacting you to notify you that your email is being changed to
<%=
@resource
.
unconfirmed_email
%>
.
</p>
<%
else
%>
<p>
We're contacting you to notify you that your email has been changed to
<%=
@resource
.
email
%>
.
</p>
<%
end
%>
app/views/users/mailer/password_change.html.erb
deleted
100644 → 0
View file @
c8d575c6
<p>
Hello
<%=
@resource
.
email
%>
!
</p>
<p>
We're contacting you to notify you that your password has been changed.
</p>
app/views/users/mailer/reset_password_instructions.html.erb
deleted
100644 → 0
View file @
c8d575c6
<p>
Hello
<%=
@resource
.
email
%>
!
</p>
<p>
Someone has requested a link to change your password. You can do this through the link below.
</p>
<p>
<%=
link_to
'Change my password'
,
edit_password_url
(
@resource
,
reset_password_token:
@token
)
%>
</p>
<p>
If you didn't request this, please ignore this email.
</p>
<p>
Your password won't change until you access the link above and create a new one.
</p>
app/views/users/mailer/unlock_instructions.html.erb
deleted
100644 → 0
View file @
c8d575c6
<p>
Hello
<%=
@resource
.
email
%>
!
</p>
<p>
Your account has been locked due to an excessive number of unsuccessful sign in attempts.
</p>
<p>
Click the link below to unlock your account:
</p>
<p>
<%=
link_to
'Unlock my account'
,
unlock_url
(
@resource
,
unlock_token:
@token
)
%>
</p>
app/views/users/passwords/edit.html.erb
deleted
100644 → 0
View file @
c8d575c6
<h2>
Change your password
</h2>
<%=
form_for
(
resource
,
as:
resource_name
,
url:
password_path
(
resource_name
),
html:
{
method: :put
})
do
|
f
|
%>
<%=
render
"devise/shared/error_messages"
,
resource:
resource
%>
<%=
f
.
hidden_field
:reset_password_token
%>
<div
class=
"field"
>
<%=
f
.
label
:password
,
"New password"
%>
<br
/>
<%
if
@minimum_password_length
%>
<em>
(
<%=
@minimum_password_length
%>
characters minimum)
</em><br
/>
<%
end
%>
<%=
f
.
password_field
:password
,
autofocus:
true
,
autocomplete:
"new-password"
%>
</div>
<div
class=
"field"
>
<%=
f
.
label
:password_confirmation
,
"Confirm new password"
%>
<br
/>
<%=
f
.
password_field
:password_confirmation
,
autocomplete:
"new-password"
%>
</div>
<div
class=
"actions"
>
<%=
f
.
submit
"Change my password"
%>
</div>
<%
end
%>
<%=
render
"users/shared/links"
%>
app/views/users/passwords/new.html.erb
deleted
100644 → 0
View file @
c8d575c6
<%
content_for
:title
,
"VenJob - Forgot your password"
%>
<header
class=
"page-header"
>
<h2
class=
"page-title"
>
Forgot your password
</h2>
</header>
<div
id=
"primary"
class=
"content-area container"
role=
"main"
>
<article
id=
"post-1673"
class=
"post-1673 page type-page status-publish hentry"
>
<div
class=
"entry-content"
>
<div
class=
"registration-form woocommerce"
>
<%=
form_for
(
resource
,
as:
resource_name
,
url:
password_path
(
resource_name
),
html:
{
method: :post
})
do
|
f
|
%>
<%=
render
"devise/shared/error_messages"
,
resource:
resource
%>
<p
class=
"field"
>
<%=
f
.
label
:email
%>
<br
/>
<%=
f
.
email_field
:email
,
autofocus:
true
,
autocomplete:
"email"
,
placeholder:
"Email"
%>
</p>
<p
class=
"actions"
>
<%=
f
.
submit
"Send me reset password instructions"
,
class:
"button"
%>
</p>
<%
end
%>
<p>
<%=
render
"devise/shared/links"
%>
</p>
</div>
</div>
</article>
</div>
\ No newline at end of file
app/views/users/registrations/edit.html.erb
deleted
100644 → 0
View file @
c8d575c6
<%
content_for
:title
,
"VenJob - Edit
#{
resource_name
.
to_s
.
humanize
}
"
%>
<header
class=
"page-header"
>
<h2
class=
"page-title"
>
Edit
<%=
resource_name
.
to_s
.
humanize
%>
</h2>
</header>
<div
id=
"primary"
class=
"content-area container"
role=
"main"
>
<article
id=
"post-1673"
class=
"post-1673 page type-page status-publish hentry"
>
<div
class=
"entry-content"
>
<div
class=
"registration-form woocommerce"
>
<%=
form_for
(
resource
,
as:
resource_name
,
url:
registration_path
(
resource_name
),
html:
{
method: :put
})
do
|
f
|
%>
<%=
render
"devise/shared/error_messages"
,
resource:
resource
%>
<p
class=
"field"
>
<%=
f
.
label
:full_name
%>
<br
/>
<%=
f
.
text_field
:full_name
,
placeholder:
"Fullname"
%>
</p>
<p
class=
"field"
>
<%=
f
.
label
:email
%>
<br
/>
<%=
f
.
email_field
:email
,
placeholder:
"Email"
%>
</p>
<%
if
devise_mapping
.
confirmable?
&&
resource
.
pending_reconfirmation?
%>
<p>
Currently waiting confirmation for:
<%=
resource
.
unconfirmed_email
%>
</p>
<%
end
%>
<p
class=
"field"
>
<%=
f
.
label
:password
%>
<i>
(leave blank if you don't want to change it)
</i><br
/>
<%=
f
.
password_field
:password
,
autocomplete:
"new-password"
,
placeholder:
"Password"
%>
<%
if
@minimum_password_length
%>
<br
/>
<em>
<%=
@minimum_password_length
%>
characters minimum
</em>
<%
end
%>
</p>
<p
class=
"field"
>
<%=
f
.
label
:password_confirmation
%>
<br
/>
<%=
f
.
password_field
:password_confirmation
,
autocomplete:
"new-password"
,
placeholder:
"Confirm password"
%>
</p>
<p
class=
"field"
>
<%=
f
.
label
:current_password
%>
<i>
(we need your current password to confirm your changes)
</i><br
/>
<%=
f
.
password_field
:current_password
,
autocomplete:
"current-password"
,
placeholder:
"Current password"
%>
</p>
<fieldset
class=
"fieldset-featured_image fieldset-type-file"
>
<%=
f
.
label
:cv
%>
<div
class=
"field "
>
<label
for=
"user_cv"
class=
"file-field-label"
>
<div
class=
"job-manager-uploaded-files"
>
</div>
<%=
f
.
file_field
:cv
,
accept:
"application/pdf,.xls,.xlsx,.doc,.zip"
%>
<span
class=
"button button--size-medium"
>
Choose file
</span>
</label>
<small
class=
"description file-field-description"
>
Allowed format: doc, pdf, xls, xlsx, zip. Maxium size: 5MB.
</small>
</div>
</fieldset>
<p
class=
"actions"
style=
"text-align: center;"
>
<%=
f
.
submit
"Update"
,
class:
"button"
%>
</p>
<%
end
%>
</div>
</div>
</article>
</div>
\ No newline at end of file
app/views/users/registrations/new.html.erb
deleted
100644 → 0
View file @
c8d575c6
<%
content_for
:title
,
"VenJob - Sign Up"
%>
<header
class=
"page-header"
>
<h2
class=
"page-title"
>
Sign Up
</h2>
</header>
<div
id=
"primary"
class=
"content-area container"
role=
"main"
>
<article
id=
"post-1673"
class=
"post-1673 page type-page status-publish hentry"
>
<div
class=
"entry-content"
>
<div
class=
"registration-form woocommerce"
>
<%=
form_for
(
resource
,
as:
resource_name
,
url:
registration_path
(
resource_name
))
do
|
f
|
%>
<%=
render
"devise/shared/error_messages"
,
resource:
resource
%>
<p
class=
"field"
>
<%=
f
.
label
:full_name
%>
<br
/>
<%=
f
.
text_field
:full_name
,
autofocus:
true
,
autocomplete:
"full_name"
%>
</p>
<p
class=
"field"
>
<%=
f
.
label
:email
%>
<br
/>
<%=
f
.
email_field
:email
,
autocomplete:
"email"
%>
</p>
<p
class=
"field"
>
<%=
f
.
label
:password
%>
<%
if
@minimum_password_length
%>
<em>
(
<%=
@minimum_password_length
%>
characters minimum)
</em>
<%
end
%>
<br
/>
<%=
f
.
password_field
:password
,
autocomplete:
"new-password"
%>
</p>
<p
class=
"field"
>
<%=
f
.
label
:password_confirmation
%>
<br
/>
<%=
f
.
password_field
:password_confirmation
,
autocomplete:
"new-password"
%>
</p>
<p
class=
"actions"
>
<%=
f
.
submit
"Sign up"
,
class:
"button"
%>
</p>
<%
end
%>
<p>
Do you have account?
<%=
render
"devise/shared/links"
%>
</p>
</div>
</div>
</article>
</div>
\ No newline at end of file
app/views/users/sessions/new.html.erb
deleted
100644 → 0
View file @
c8d575c6
<%
content_for
:title
,
"VenJob - Sign In"
%>
<header
class=
"page-header"
>
<h2
class=
"page-title"
>
Sign In
</h2>
</header>
<div
id=
"primary"
class=
"content-area container"
role=
"main"
>
<article
id=
"post-1673"
class=
"post-1673 page type-page status-publish hentry"
>
<div
class=
"entry-content"
>
<div
class=
"registration-form woocommerce"
>
<%=
form_for
(
resource
,
as:
resource_name
,
url:
session_path
(
resource_name
))
do
|
f
|
%>
<p
class=
"field"
>
<%=
f
.
label
:email
%>
<br
/>
<%=
f
.
email_field
:email
,
autofocus:
true
,
autocomplete:
"email"
%>
</p>
<p
class=
"field"
>
<%=
f
.
label
:password
%>
<br
/>
<%=
f
.
password_field
:password
,
autocomplete:
"current-password"
%>
</p>
<%
if
devise_mapping
.
rememberable?
%>
<p
class=
"field"
>
<%=
f
.
check_box
:remember_me
%>
<%=
f
.
label
:remember_me
%>
</p>
<%
end
%>
<p
class=
"actions"
>
<%=
f
.
submit
"Log in"
,
class:
"button"
%>
</p>
<%
end
%>
<p>
<%=
render
"devise/shared/links"
%>
</p>
</div>
</div>
</article>
</div>
\ No newline at end of file
app/views/users/shared/_error_messages.html.erb
deleted
100644 → 0
View file @
c8d575c6
<%
if
resource
.
errors
.
any?
%>
<div
id=
"error_explanation"
>
<h2>
<%=
I18n
.
t
(
"errors.messages.not_saved"
,
count:
resource
.
errors
.
count
,
resource:
resource
.
class
.
model_name
.
human
.
downcase
)
%>
</h2>
<ul>
<%
resource
.
errors
.
full_messages
.
each
do
|
message
|
%>
<li>
<%=
message
%>
</li>
<%
end
%>
</ul>
</div>
<%
end
%>
app/views/users/shared/_links.html.erb
deleted
100644 → 0
View file @
c8d575c6
<%-
if
controller_name
!=
'sessions'
%>
<%=
link_to
"Log in"
,
new_session_path
(
resource_name
)
%>
<br
/>
<%
end
%>
<%-
if
devise_mapping
.
registerable?
&&
controller_name
!=
'registrations'
%>
<%=
link_to
"Sign up"
,
new_registration_path
(
resource_name
)
%>
<br
/>
<%
end
%>
<%-
if
devise_mapping
.
recoverable?
&&
controller_name
!=
'passwords'
&&
controller_name
!=
'registrations'
%>
<%=
link_to
"Forgot your password?"
,
new_password_path
(
resource_name
)
%>
<br
/>
<%
end
%>
<%-
if
devise_mapping
.
confirmable?
&&
controller_name
!=
'confirmations'
%>
<%=
link_to
"Didn't receive confirmation instructions?"
,
new_confirmation_path
(
resource_name
)
%>
<br
/>
<%
end
%>
<%-
if
devise_mapping
.
lockable?
&&
resource_class
.
unlock_strategy_enabled?
(
:email
)
&&
controller_name
!=
'unlocks'
%>
<%=
link_to
"Didn't receive unlock instructions?"
,
new_unlock_path
(
resource_name
)
%>
<br
/>
<%
end
%>
<%-
if
devise_mapping
.
omniauthable?
%>
<%-
resource_class
.
omniauth_providers
.
each
do
|
provider
|
%>
<%=
link_to
"Sign in with
#{
OmniAuth
::
Utils
.
camelize
(
provider
)
}
"
,
omniauth_authorize_path
(
resource_name
,
provider
)
%>
<br
/>
<%
end
%>
<%
end
%>
app/views/users/unlocks/new.html.erb
deleted
100644 → 0
View file @
c8d575c6
<h2>
Resend unlock instructions
</h2>
<%=
form_for
(
resource
,
as:
resource_name
,
url:
unlock_path
(
resource_name
),
html:
{
method: :post
})
do
|
f
|
%>
<%=
render
"devise/shared/error_messages"
,
resource:
resource
%>
<div
class=
"field"
>
<%=
f
.
label
:email
%>
<br
/>
<%=
f
.
email_field
:email
,
autofocus:
true
,
autocomplete:
"email"
%>
</div>
<div
class=
"actions"
>
<%=
f
.
submit
"Resend unlock instructions"
%>
</div>
<%
end
%>
<%=
render
"users/shared/links"
%>
config/environments/development.rb
View file @
4439bf12
...
...
@@ -59,4 +59,8 @@ Rails.application.configure do
# Use an evented file watcher to asynchronously detect changes in source code,
# routes, locales, etc. This feature depends on the listen gem.
config
.
file_watcher
=
ActiveSupport
::
EventedFileUpdateChecker
config
.
action_mailer
.
default_url_options
=
{
:host
=>
'localhost:3000'
}
config
.
action_mailer
.
delivery_method
=
:smtp
config
.
action_mailer
.
smtp_settings
=
{
:address
=>
"localhost"
,
:port
=>
1025
}
end
config/routes.rb
View file @
4439bf12
...
...
@@ -3,7 +3,8 @@ Rails.application.routes.draw do
sessions:
'admins/sessions'
}
devise_for
:users
,
controllers:
{
sessions:
'users/sessions'
sessions:
'users/sessions'
,
confirmations:
'users/confirmations'
}
# For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
root
to:
'home#index'
...
...
db/migrate/20200408024813_devise_create_users.rb
View file @
4439bf12
...
...
@@ -22,10 +22,10 @@ class DeviseCreateUsers < ActiveRecord::Migration[6.0]
# t.string :last_sign_in_ip
## Confirmable
#
t.string :confirmation_token
#
t.datetime :confirmed_at
#
t.datetime :confirmation_sent_at
#
t.string :unconfirmed_email # Only if using reconfirmable
t
.
string
:confirmation_token
t
.
datetime
:confirmed_at
t
.
datetime
:confirmation_sent_at
t
.
string
:unconfirmed_email
# Only if using reconfirmable
## Lockable
# t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
...
...
@@ -38,7 +38,7 @@ class DeviseCreateUsers < ActiveRecord::Migration[6.0]
add_index
:users
,
:email
,
unique:
true
add_index
:users
,
:reset_password_token
,
unique:
true
#
add_index :users, :confirmation_token, unique: true
add_index
:users
,
:confirmation_token
,
unique:
true
# add_index :users, :unlock_token, unique: true
end
end
db/schema.rb
View file @
4439bf12
...
...
@@ -12,7 +12,7 @@
ActiveRecord
::
Schema
.
define
(
version:
2020_04_23_044651
)
do
create_table
"admins"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_0900_ai_ci
"
,
force: :cascade
do
|
t
|
create_table
"admins"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4"
,
force: :cascade
do
|
t
|
t
.
string
"email"
,
default:
""
,
null:
false
t
.
string
"encrypted_password"
,
default:
""
,
null:
false
t
.
string
"reset_password_token"
...
...
@@ -24,7 +24,7 @@ ActiveRecord::Schema.define(version: 2020_04_23_044651) do
t
.
index
[
"reset_password_token"
],
name:
"index_admins_on_reset_password_token"
,
unique:
true
end
create_table
"applies"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_0900_ai_ci
"
,
force: :cascade
do
|
t
|
create_table
"applies"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4"
,
force: :cascade
do
|
t
|
t
.
bigint
"user_id"
,
null:
false
t
.
bigint
"job_id"
,
null:
false
t
.
datetime
"created_at"
,
precision:
6
,
null:
false
...
...
@@ -33,21 +33,21 @@ ActiveRecord::Schema.define(version: 2020_04_23_044651) do
t
.
index
[
"user_id"
],
name:
"index_applies_on_user_id"
end
create_table
"cities"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_0900_ai_ci
"
,
force: :cascade
do
|
t
|
create_table
"cities"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4"
,
force: :cascade
do
|
t
|
t
.
string
"title"
t
.
datetime
"created_at"
,
precision:
6
,
null:
false
t
.
datetime
"updated_at"
,
precision:
6
,
null:
false
t
.
boolean
"foreign"
,
default:
false
end
create_table
"cities_jobs"
,
id:
false
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_0900_ai_ci
"
,
force: :cascade
do
|
t
|
create_table
"cities_jobs"
,
id:
false
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4"
,
force: :cascade
do
|
t
|
t
.
bigint
"city_id"
,
null:
false
t
.
bigint
"job_id"
,
null:
false
t
.
index
[
"city_id"
,
"job_id"
],
name:
"index_cities_jobs_on_city_id_and_job_id"
t
.
index
[
"job_id"
,
"city_id"
],
name:
"index_cities_jobs_on_job_id_and_city_id"
end
create_table
"companies"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_0900_ai_ci
"
,
force: :cascade
do
|
t
|
create_table
"companies"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4"
,
force: :cascade
do
|
t
|
t
.
string
"title"
t
.
string
"address"
t
.
string
"logo"
...
...
@@ -56,7 +56,7 @@ ActiveRecord::Schema.define(version: 2020_04_23_044651) do
t
.
datetime
"updated_at"
,
precision:
6
,
null:
false
end
create_table
"favorites"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_0900_ai_ci
"
,
force: :cascade
do
|
t
|
create_table
"favorites"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4"
,
force: :cascade
do
|
t
|
t
.
bigint
"user_id"
,
null:
false
t
.
bigint
"job_id"
,
null:
false
t
.
datetime
"created_at"
,
precision:
6
,
null:
false
...
...
@@ -65,20 +65,20 @@ ActiveRecord::Schema.define(version: 2020_04_23_044651) do
t
.
index
[
"user_id"
],
name:
"index_favorites_on_user_id"
end
create_table
"industries"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_0900_ai_ci
"
,
force: :cascade
do
|
t
|
create_table
"industries"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4"
,
force: :cascade
do
|
t
|
t
.
string
"title"
t
.
datetime
"created_at"
,
precision:
6
,
null:
false
t
.
datetime
"updated_at"
,
precision:
6
,
null:
false
end
create_table
"industries_jobs"
,
id:
false
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_0900_ai_ci
"
,
force: :cascade
do
|
t
|
create_table
"industries_jobs"
,
id:
false
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4"
,
force: :cascade
do
|
t
|
t
.
bigint
"industry_id"
,
null:
false
t
.
bigint
"job_id"
,
null:
false
t
.
index
[
"industry_id"
,
"job_id"
],
name:
"index_industries_jobs_on_industry_id_and_job_id"
t
.
index
[
"job_id"
,
"industry_id"
],
name:
"index_industries_jobs_on_job_id_and_industry_id"
end
create_table
"jobs"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_0900_ai_ci
"
,
force: :cascade
do
|
t
|
create_table
"jobs"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4"
,
force: :cascade
do
|
t
|
t
.
string
"title"
t
.
string
"updated_date_job"
t
.
string
"level"
...
...
@@ -92,16 +92,21 @@ ActiveRecord::Schema.define(version: 2020_04_23_044651) do
t
.
index
[
"company_id"
],
name:
"index_jobs_on_company_id"
end
create_table
"users"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
COLLATE=utf8mb4_0900_ai_ci
"
,
force: :cascade
do
|
t
|
create_table
"users"
,
options:
"ENGINE=InnoDB DEFAULT CHARSET=utf8mb4"
,
force: :cascade
do
|
t
|
t
.
string
"email"
,
default:
""
,
null:
false
t
.
string
"encrypted_password"
,
default:
""
,
null:
false
t
.
string
"reset_password_token"
t
.
datetime
"reset_password_sent_at"
t
.
datetime
"remember_created_at"
t
.
string
"confirmation_token"
t
.
datetime
"confirmed_at"
t
.
datetime
"confirmation_sent_at"
t
.
string
"unconfirmed_email"
t
.
datetime
"created_at"
,
precision:
6
,
null:
false
t
.
datetime
"updated_at"
,
precision:
6
,
null:
false
t
.
string
"full_name"
t
.
string
"cv"
t
.
index
[
"confirmation_token"
],
name:
"index_users_on_confirmation_token"
,
unique:
true
t
.
index
[
"email"
],
name:
"index_users_on_email"
,
unique:
true
t
.
index
[
"reset_password_token"
],
name:
"index_users_on_reset_password_token"
,
unique:
true
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment