Closed chx2 closed 3 years ago
We need to create a migration to seed the timezones table. I want EST to be first with CST 2nd and so forth. I think I have a list of the USA ones somewhere.
Here it is. Can we get these into that table with the same ID?
\DB::table('timezones')->insert([
0 => [
'id' => 1,
'name' => 'EST',
'title' => 'Eastern',
'php' => 'America/New_York',
'is_daylight_saving' => 1,
'dst' => '-4.00',
'standard' => '-5.00',
],
1 => [
'id' => 2,
'name' => 'CST',
'title' => 'Central',
'php' => 'America/Chicago',
'is_daylight_saving' => 1,
'dst' => '-5.00',
'standard' => '-6.00',
],
2 => [
'id' => 3,
'name' => 'MST',
'title' => 'Mountain',
'php' => 'America/Denver',
'is_daylight_saving' => 1,
'dst' => '-6.00',
'standard' => '-7.00',
],
3 => [
'id' => 4,
'name' => 'MDT',
'title' => 'Mountain no DST',
'php' => 'America/Phoenix',
'is_daylight_saving' => 0,
'dst' => '-7.00',
'standard' => '-8.00',
],
4 => [
'id' => 5,
'name' => 'PST',
'title' => 'Pacific',
'php' => 'America/Los_Angeles',
'is_daylight_saving' => 1,
'dst' => '-8.00',
'standard' => '-8.00',
],
5 => [
'id' => 6,
'name' => 'AKST',
'title' => 'Alaska',
'php' => 'America/Anchorage',
'is_daylight_saving' => 1,
'dst' => '-8.00',
'standard' => '-9.00',
],
6 => [
'id' => 7,
'name' => 'HAST',
'title' => 'Hawaii–Aleutian',
'php' => 'America/Adak',
'is_daylight_saving' => 1,
'dst' => '-9.00',
'standard' => '-10.00',
],
7 => [
'id' => 8,
'name' => 'HADT',
'title' => 'Hawaii no DST',
'php' => 'Pacific/Honolulu',
'is_daylight_saving' => 0,
'dst' => '-9.00',
'standard' => '-9.00',
],
]);
@drewroberts I recall that we want a model for Google MyBusiness entries; is there a specific reason why there's two tables for GMB data? It looks like both hold references to a Location model.
Would it make sense compress the tables by storing daily open/close status values via a jsonb
column into the gmb_details
table? Or is there something I'm missing?
Let's create 2 separate models for the Google My Business Data. You can call them GmbDetails
and GmbHours
I like having them separate because I want to know when was the last time the main Details about the business in GMB (#44) was updated vs just an update to the hours of operation.
I thought about using jsonb
for the values as that would be better in most cases, but since I am trying to essentially version control when they were changed, I prefer using actual table fields here.
I'm going to remove Timezone from this PR and move it over to the tipoff/addresses package.
I moved Timezones from this PR to the one in the tipoff/addresses package:
Added the new models/factories/migrations/policies. Need to add aliases to support to fix tests
I think I didn't communicate well in issue #52 about Profile Links. That model is supposed to go into the tipoff/seo package.
@drewroberts is there anything else that needs to be done in this PR?