@@ 60-76 (lines=17) @@ | ||
57 | * |
|
58 | * @module users |
|
59 | */ |
|
60 | class Update20131021 extends Update |
|
61 | { |
|
62 | public function update_column_password_hash() |
|
63 | { |
|
64 | $this->module->model |
|
65 | ->assert_has_column('password_hash') |
|
66 | ->assert_not_column_has_size('password_hash', 255) |
|
67 | ->alter_column('password_hash'); |
|
68 | } |
|
69 | ||
70 | public function update_column_created() |
|
71 | { |
|
72 | $this->module->model |
|
73 | ->assert_has_column('created') |
|
74 | ->rename_column('created', 'created_at'); |
|
75 | } |
|
76 | } |
|
77 | ||
78 | /** |
|
79 | * @module users |
|
@@ 81-112 (lines=32) @@ | ||
78 | /** |
|
79 | * @module users |
|
80 | */ |
|
81 | class Update20131022 extends Update |
|
82 | { |
|
83 | /** |
|
84 | * Rename the column `display` as `name_as`. |
|
85 | */ |
|
86 | public function update_column_display() |
|
87 | { |
|
88 | $this->module->model |
|
89 | ->assert_has_column('display') |
|
90 | ->rename_column('display', 'name_as'); |
|
91 | } |
|
92 | ||
93 | /** |
|
94 | * Create column `nickname`. |
|
95 | */ |
|
96 | public function update_column_nickname() |
|
97 | { |
|
98 | $this->module->model |
|
99 | ->assert_not_has_column('nickname') |
|
100 | ->create_column('nickname'); |
|
101 | } |
|
102 | ||
103 | /** |
|
104 | * Rename column `lastconnection` as `logged_at`. |
|
105 | */ |
|
106 | public function update_column_lastconnection() |
|
107 | { |
|
108 | $this->module->model |
|
109 | ->assert_has_column('lastconnection') |
|
110 | ->rename_column('lastconnection', 'logged_at'); |
|
111 | } |
|
112 | } |
|
113 | ||
114 | ||
115 | /** |