@@ -38,10 +38,10 @@ This project uses Supabase as a backend service. Supabase is an open-source alte
3838
3939You can create a Supabase project by following the instructions on the [ official website] ( https://supabase.com/ ) . After creating the project, you can obtain the API key and URL from the project settings.
4040
41-
4241### 1.2. Database definition 📜 <a name =" database-definition " ></a >
4342
4443#### 1.2.1. Languages
44+
4545``` sql
4646create table
4747 public .languages (
@@ -56,13 +56,10 @@ create table
5656 constraint languages_acronym_key unique (acronym),
5757 constraint languages_uid_key unique (id)
5858 ) tablespace pg_default;
59-
60- create trigger handle_updated_at_languages before
61- update on languages for each row
62- execute function moddatetime (' updated_at' );
6359```
6460
6561#### 1.2.2. Skill Types
62+
6663``` sql
6764create table
6865 public .skill_types (
@@ -74,13 +71,10 @@ create table
7471 constraint skill_types_pkey primary key (id),
7572 constraint skill_types_uuid_key unique (id)
7673 ) tablespace pg_default;
77-
78- create trigger handle_updated_at_skill_types before
79- update on skill_types for each row
80- execute function moddatetime (' updated_at' );
8174```
8275
8376#### 1.2.3. Skills
77+
8478``` sql
8579create table
8680 public .skills (
@@ -94,13 +88,10 @@ create table
9488 constraint skills_name_key unique (name),
9589 constraint skills_skill_type_id_fkey foreign key (skill_type_id) references skill_types (id)
9690 ) tablespace pg_default;
97-
98- create trigger handle_updated_at_skills before
99- update on skills for each row
100- execute function moddatetime (' updated_at' );
10191```
10292
10393#### 1.2.4. Certificate Groups
94+
10495``` sql
10596create table
10697 public .certificate_groups (
@@ -111,13 +102,10 @@ create table
111102 description_translations jsonb not null default ' []' ::jsonb,
112103 constraint certificate_groups_pkey primary key (id)
113104 ) tablespace pg_default;
114-
115- create trigger handle_updated_at_certificate_groups before
116- update on certificate_groups for each row
117- execute function moddatetime (' updated_at' );
118105```
119106
120107#### 1.2.5. Certificate Types
108+
121109``` sql
122110create table
123111 public .certificate_types (
@@ -129,10 +117,6 @@ create table
129117 constraint certificate_types_pkey primary key (id),
130118 constraint certificate_types_uuid_key unique (id)
131119 ) tablespace pg_default;
132-
133- create trigger handle_updated_at_certificate_types before
134- update on certificate_types for each row
135- execute function moddatetime (' updated_at' );
136120```
137121
138122#### 1.2.6. Companies
@@ -154,13 +138,10 @@ create table
154138 constraint companies_name_key unique (name),
155139 constraint companies_uuid_key unique (id)
156140 ) tablespace pg_default;
157-
158- create trigger handle_updated_at_companies before
159- update on companies for each row
160- execute function moddatetime (' updated_at' );
161141```
162142
163143#### 1.2.7. Positions
144+
164145``` sql
165146create table
166147 public .positions (
@@ -177,13 +158,10 @@ create table
177158 constraint positions_pkey primary key (id),
178159 constraint positions_company_id_fkey foreign key (company_id) references companies (id) on delete set null
179160 ) tablespace pg_default;
180-
181- create trigger handle_updated_at_positions before
182- update on positions for each row
183- execute function moddatetime (' updated_at' );
184161```
185162
186163#### 1.2.8. Certificates
164+
187165``` sql
188166create table
189167 public .certificates (
@@ -208,10 +186,26 @@ create table
208186 constraint certificates_certificate_type_id_fkey foreign key (certificate_type_id) references certificate_types (id) on delete set null ,
209187 constraint certificates_company_id_fkey foreign key (company_id) references companies (id) on delete set null
210188 ) tablespace pg_default;
189+ ```
190+
191+ #### 1.2.9. Projects
211192
212- create trigger handle_updated_at_certificates before
213- update on certificates for each row
214- execute function moddatetime (' updated_at' );
193+ ``` sql
194+ create table
195+ public .projects (
196+ id uuid not null default gen_random_uuid (),
197+ created_at timestamp with time zone not null default now(),
198+ name text not null ,
199+ description_translations json null ,
200+ date date null ,
201+ company_id uuid null ,
202+ urls json null ,
203+ updated_at timestamp with time zone null ,
204+ technologies text [] null ,
205+ logo text null ,
206+ constraint projects_pkey primary key (id),
207+ constraint public_projects_company_id_fkey foreign key (company_id) references companies (id)
208+ ) tablespace pg_default;
215209```
216210
217211### 1.3. Environment Configuration 🛠️ <a name =" environment-configuration " ></a >
@@ -279,13 +273,14 @@ An example of our workflows is [github-pages-deploy.yml](.github/workflows/githu
279273** Activation** : This workflow is activated when a push is made to the 'main' branch.
2802742 . ** Execution Environment** : The workflow runs on the latest available version of Ubuntu.
2812753 . ** Steps** :
282- - ** Checkout** : This step checks out the repository using GitHub's 'checkout' action.
283- - ** Setup node.js** : This step sets up a specific Node.js version using GitHub's 'setup-node' action.
284- - ** Generate environment file from github secrets** : This step creates an environment file from GitHub secrets for use in the application.
285- - ** Install dependencies** : This step installs all the necessary dependencies for the project using ` npm install ` .
286- - ** Run tests** : This step runs all unit tests to ensure the application is working as expected using ` npm test ` .
287- - ** Build app** : This step builds the application for production using ` npm run build ` .
288- - ** Deployment** : This step deploys the 'dist/browser' directory on GitHub Pages using GitHub's 'gh-pages' action.
276+
277+ - ** Checkout** : This step checks out the repository using GitHub's 'checkout' action.
278+ - ** Setup node.js** : This step sets up a specific Node.js version using GitHub's 'setup-node' action.
279+ - ** Generate environment file from github secrets** : This step creates an environment file from GitHub secrets for use in the application.
280+ - ** Install dependencies** : This step installs all the necessary dependencies for the project using ` npm install ` .
281+ - ** Run tests** : This step runs all unit tests to ensure the application is working as expected using ` npm test ` .
282+ - ** Build app** : This step builds the application for production using ` npm run build ` .
283+ - ** Deployment** : This step deploys the 'dist/browser' directory on GitHub Pages using GitHub's 'gh-pages' action.
289284
290285For more information on how to use GitHub Actions, you can consult the [ official documentation] ( https://docs.github.com/en/actions ) .
291286
0 commit comments