Skip to content

Commit 73fb75c

Browse files
yahondadkani
authored andcommitted
Create PostgreSQL and MySQL databases at devcontainer
This pull request creates PostgreSQL and MySQL databases at devcontainer. The current one runs the last exit even if the `activerecord` directory exists. ``` cd activerecord || echo "activerecord directory doesn't exist" && exit ``` As a result, `activerecord_unittest` or `activerecord_unittest2` are not created in both PostgreSQL and MySQL. - Without this commit: `activerecord_unittest` or `activerecord_unittest2` are not created ```sql $ mysql -uroot -proot ... snip ... MariaDB [(none)]> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | sys | +--------------------+ 4 rows in set (0.001 sec) ``` ```sql $ psql -d postgres psql (17.4 (Debian 17.4-1.pgdg120+2)) Type "help" for help. postgres=# \l List of databases Name | Owner | Encoding | Locale Provider | Collate | Ctype | Locale | ICU Rules | Access privileges -----------+----------+----------+-----------------+------------+------------+--------+-----------+----------------------- postgres | postgres | UTF8 | libc | en_US.utf8 | en_US.utf8 | | | template0 | postgres | UTF8 | libc | en_US.utf8 | en_US.utf8 | | | =c/postgres + | | | | | | | | postgres=CTc/postgres template1 | postgres | UTF8 | libc | en_US.utf8 | en_US.utf8 | | | =c/postgres + | | | | | | | | postgres=CTc/postgres (3 rows) ```
1 parent 6893da5 commit 73fb75c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.devcontainer/boot.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ if [ -n "${NVM_DIR}" ]; then
88
yarn install
99
fi
1010

11-
cd activerecord || echo "activerecord directory doesn't exist" && exit
11+
cd activerecord || { echo "activerecord directory doesn't exist"; exit; }
1212

1313
# Create PostgreSQL databases
1414
bundle exec rake db:postgresql:rebuild

0 commit comments

Comments
 (0)