You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 2, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: Makefile
+7-5Lines changed: 7 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -5,8 +5,9 @@ help: ## Display this help
5
5
.PHONY: init
6
6
init: ## Init database
7
7
@rm -f var/db.sqlite
8
-
@sqlite3 -line var/db.sqlite 'CREATE TABLE php_release(version VARCHAR(15) PRIMARY KEY, release_date DATE NOT NULL);'
9
-
@sqlite3 -line var/db.sqlite 'CREATE TABLE php_version(version VARCHAR(15) PRIMARY KEY, last_release VARCHAR(15) NOT NULL, initial_release_date DATE NOT NULL, active_support_until DATE, end_of_life_date DATE NOT NULL);'
8
+
@sqlite3 -line var/db.sqlite 'CREATE TABLE IF NOT EXISTS php_release(version VARCHAR(15) PRIMARY KEY, release_date DATE NOT NULL);'
9
+
@sqlite3 -line var/db.sqlite 'CREATE TABLE IF NOT EXISTS php_version(version VARCHAR(15) PRIMARY KEY, last_release VARCHAR(15) NOT NULL, initial_release_date DATE NOT NULL, active_support_until DATE, end_of_life_date DATE NOT NULL);'
10
+
@sqlite3 -line var/db.sqlite 'CREATE TABLE IF NOT EXISTS last_update(last_update DATETIME NOT NULL);'
10
11
11
12
.PHONY: clean
12
13
clean: ## Clean project files
@@ -23,9 +24,10 @@ serve: ## Run project through docker-compose
23
24
24
25
ifeq (,$(wildcard var/db.sqlite))
25
26
@echo "--> Initialize database"
26
-
@docker-compose exec fpm sqlite3 -line var/db.sqlite 'CREATE TABLE php_release(version VARCHAR(15) PRIMARY KEY, release_date DATE NOT NULL);'
27
-
@docker-compose exec fpm sqlite3 -line var/db.sqlite 'CREATE TABLE php_version(version VARCHAR(15) PRIMARY KEY, last_release VARCHAR(15) NOT NULL, initial_release_date DATE NOT NULL, active_support_until DATE, end_of_life_date DATE NOT NULL);'
27
+
@docker-compose exec fpm sqlite3 -line var/db.sqlite 'CREATE TABLE IF NOT EXISTS php_release(version VARCHAR(15) PRIMARY KEY, release_date DATE NOT NULL);'
28
+
@docker-compose exec fpm sqlite3 -line var/db.sqlite 'CREATE TABLE IF NOT EXISTS php_version(version VARCHAR(15) PRIMARY KEY, last_release VARCHAR(15) NOT NULL, initial_release_date DATE NOT NULL, active_support_until DATE, end_of_life_date DATE NOT NULL);'
29
+
@docker-compose exec fpm sqlite3 -line var/db.sqlite 'CREATE TABLE IF NOT EXISTS last_update(last_update DATETIME NOT NULL);'
0 commit comments