https://github.com/toshimaru/rdm-rails5.1
https://github.com/toshimaru/rdm-rails5.1
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/toshimaru/rdm-rails5.1
- Owner: toshimaru
- Created: 2018-02-14T14:34:17.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2022-12-04T07:53:09.000Z (over 3 years ago)
- Last Synced: 2024-04-14T18:22:27.881Z (about 2 years ago)
- Language: Ruby
- Size: 20.4 MB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# README [](https://circleci.com/gh/toshimaru/rdm-rails5.1)
## Create User CSV Data
```
$ bundle exec rails create_big_user_csv_data
```
## Load CSV Data
```
mysql -u root --local-infile -e "LOAD DATA LOCAL INFILE './db/user_seed.csv' INTO TABLE rdm_development.users FIELDS TERMINATED BY ',' (email, name, point, created_at, updated_at)"
mysql -u root --local-infile -e "LOAD DATA LOCAL INFILE './db/post_seed.csv' INTO TABLE rdm_development.posts FIELDS TERMINATED BY ',' (user_id, title, content, like_count, created_at, updated_at)"
```
## Reset User DATA
```
$ bundle exec rails db:migrate:reset
```