Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#95 allow user to choose timezone #104

Merged
merged 7 commits into from
Sep 14, 2015
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
#95: add timezone to user
  • Loading branch information
jmiranda committed Sep 14, 2015
commit 9de28efa3e6991fc7105c89ac17f2872218648fc
2 changes: 2 additions & 0 deletions grails-app/domain/org/pih/warehouse/core/User.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class User extends Person {
String password; // encrypted password
String passwordConfirm; // password confirm used on signup and password reset
Locale locale; // the user's locale
String timezone

Date lastLoginDate; // keep track of the user's last login
Location warehouse; // keep track of the user's last warehouse
Expand Down Expand Up @@ -46,6 +47,7 @@ class User extends Person {
})
passwordConfirm(blank: false)
locale(nullable: true)
timezone(nullable:true)
lastLoginDate(nullable: true)
//useSavedLocation(nullable:true)
warehouse(nullable: true)
Expand Down
17 changes: 17 additions & 0 deletions grails-app/migrations/0.6.x/add-column-user-timezone.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog xmlns="http:https://www.liquibase.org/xml/ns/dbchangelog/1.9"
xmlns:xsi="http:https://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http:https://www.liquibase.org/xml/ns/dbchangelog/1.9 http:https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd">
<changeSet author="jmiranda (generated)" id="1442206717583-1">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="user" columnName="timezone"/>
</not>
</preConditions>
<addColumn tableName="user">
<column name="timezone" type="VARCHAR(255)">
<constraints nullable="true" />
</column>
</addColumn>
</changeSet>
</databaseChangeLog>
1 change: 1 addition & 0 deletions grails-app/migrations/0.6.x/changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@

<include file="0.6.x/modify-column-order-unit-price.xml"/>
<include file="0.6.x/create-table-inventory-item-snapshot.xml"/>
<include file="0.6.x/add-column-user-timezone.xml"/>

</databaseChangeLog>